aaif-goose / aaif-goose/goose

Remove ongoing tool-pair summarization

Open
#11,764 4 comments 0 reactions 2 assignees Assigned to @filipkujawa View on GitHub
Dominant language
Rust
Stars
54.2k
Forks
6.2k
Avg merge
3d 4h
Merged PRs (30d)
240

Description

# Remove ongoing tool-pair summarization

**What problem would this solve?**

Tool-pair summarization is enabled by default and periodically rewrites provider-visible conversation history.

When the eligible tool-call count exceeds the cutoff plus 10, goose selects the oldest 10 calls, makes up to 10 additional model calls to summarize them, marks the original request/result messages agent-invisible, and appends generated summaries.

This creates three problems:

- Prompt caches require a stable prefix.
Rewriting the oldest visible tool pairs invalidates most of the cached conversation.
[#10030](https://github.com/aaif-goose/goose/pull/10030) demonstrated how valuable stable Anthropic prefixes are.

- Rewriting history is becoming a provider-compatibility risk.
Anthropic requires preserved thinking blocks to be replayed unmodified, and direct provider guidance indicates that newer validation binds them to the preceding conversation.
Replacing an earlier tool pair while retaining later thinking can make that history invalid.
[Anthropic's documentation](https://platform.claude.com/docs/en/docs/build-with-claude/extended-thinking#preserving-thinking-blocks) recommends replaying complete, unmodified thinking blocks.

- The policy is based on tool-call count rather than token usage.
Ten tiny results can trigger summarization, while a single oversized result does not.
The summaries also add model cost, latency, and information loss.

**What would a good outcome look like?**

- Remove ongoing tool-pair summarization from both agent loops.
- Keep provider-visible history immutable between full compactions.
- Keep full compaction as the explicit boundary that starts a new conversation.
- Preserve or improve long-horizon task success while reducing cache writes, auxiliary model calls, and latency.

- [x] I have verified this does not duplicate an existing removal proposal.

Contributor guide

Open the contributing guide

Research direction

Find the agent loops and the tool-pair summarization logic. Look for the cutoff and summarization trigger based on tool-call count. Understand how provider-visible history is currently rewritten and where prompt caches are invalidated. The goal is to remove this ongoing summarization while preserving full compaction as the explicit conversation boundary.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai-infra-agents
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.