- Author
- Not stated
- Published
- Undated
- Kind
- Source code file in Python, with long explanatory docstrings
- Original
- github.com/crow-cli/crow-cli/blob/main/crow-cli/src/crow_cli/agent/compact.py
- Subject
- Harnesses and agent loops
What it is
The file is part of crow-cli, a coding agent. It turns an agent's long history into a summary. A new agent record then starts from that summary and recent messages.
What it says
- Compaction summarizes a long conversation into a fresh agent record. The old agent and its messages stay untouched.
- The summary is one model call with tool use switched off.
- Compaction is a callable that a project can replace. The default strategy makes one summarizing pass.
- Earlier versions ran two extra passes. A comment says these roughly tripled time and cost.
- The prompt tells the model to compress any earlier summary, not copy it forward.
- A comment reports uncapped handoffs growing from 11k to 172k characters over six generations.
What evidence it gives
The source is the code and its comments. A comment reports a measured growth in handoff size. The file shows no tests or benchmarks of its own.
Interests and limits
The bookmarked path returns a not-found error. The file was read from src/crow_cli/agent/compact.py on the main branch instead. It is one file, so the rest of the agent was not examined. The code was not run. The author is not stated in the file.