From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender5-of-o51.zoho.com (sender5-of-o51.zoho.com [165.173.182.51]) by hrrol.systemreboot.net (OpenSMTPD) with ESMTPS id 288385bd (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 7 Nov 2026 08:16:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1794039362; cv=none; d=zohomail.com; s=zohoarc; b=GuAB2ZwdPO7oNtwREpYxpzTQHBnQFZ/iN8alZb2ocG9+GSp83gfmqOUyWHrXQ6YJz0r2AwoXht+2ZFrFwZU18o/DcsuE3ULtyDn6nF2CCWwTgYgo/4QFyCDO8UmzHXwBM9L+GYjUYrE+brJmCSQXw9B6n61EkFvizekBpa0W24Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1794039362; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=5zNejKhFFs9FZljfLEUkKa8NeP+kYRgZylWB2Sjo9PY=; b=UJZ6pj13vb7b7G3lo5J44uNbRuujvHQCS4Bp0XoCYQFGokQQr031tZwrJ5ZQxZighbSoDW0MpJsM2/Yj7SYKDEoQxK3weXTM/NciBq9iMWk/uaoADj0NAdiQfWP1Jd47sGdwNsFkMFM2dOT2Sg0Vpqh07ALP+xAtPpkL4bI1R7s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=C/sru022dm/2/OB3RrXcdKFtc8IWiG8+c1qF+NM7KtnchkpBZawhvX9/bcPfKR5uFdK/txfbragt9wSOKj5KAe5Xv+wgT456p2lzHhtVTsregKPdQY1gE5xLydq/SMqxlHj3aMOq03/j07DJhLcdMwS54unxhth7z9PJUp7jvDM=; c=relaxed/relaxed; s=zoho; d=elephly.net; v=1; bh=5zNejKhFFs9FZljfLEUkKa8NeP+kYRgZylWB2Sjo9PY=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1794039359546837.2711511724754; Sat, 7 Nov 2026 00:15:59 -0800 (PST) From: Ricardo Wurmus To: Arun Isaac Cc: Ricardo Wurmus , kaagum@systemreboot.net Subject: Re: strategies for context management In-Reply-To: <87jympps3s.fsf@elephly.net> References: <87ld76e5w0.fsf@elephly.net> <87fqxerqg6.fsf@systemreboot.net> <87jympps3s.fsf@elephly.net> User-Agent: mu4e 1.14.4; emacs 31.1 Date: Sat, 07 Nov 2026 09:15:55 +0100 Message-ID: <87eccxoy4k.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-ZohoMailClient: External List-Id: Ricardo Wurmus writes: >> I haven't thought hard about context compaction or read much of >> the >> literature. But I'm open to ideas. Let me know what you have in >> mind. > > it would be helpful to provide a means for users to delete or > edit > session messages to reduce the effective context. I don't know > if > kaagum's design makes this possible or if perhaps it is > something that > is not wanted due to design constraints. > > As far as I understand, however, it is up to agent harnesses to > implement context management if they need it. My proposal is to add a compaction strategy record with a predicate and a handler. The predicate takes the current state and decides whether compaction should be performed. The handler takes state and returns new state. A complication is that a handler may issue LLM calls (e.g. to summarize stuff), and I don't know how this would slot into the TEA loop. Perhaps triggering session/fork would be appropriate then. Users could then provide their own compaction strategies, including none at all. -- Ricardo