-
Notifications
You must be signed in to change notification settings - Fork 0
Context budget: conversation history replay is expensive in long sessions #452
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Long sessions involving debugging, code archaeology, implementation, and follow-up accumulate expensive conversation history. Claude Code compresses automatically near context limits, but by that point the session is already degraded:
- Responses slow down as context grows
- Earlier context gets compressed/lost at the worst time
- Cost per turn increases linearly with history
Proposed Solutions
- Session segmentation guidance — retort docs should recommend session boundaries (e.g., "start a new session after completing a feature, not mid-debug"). The
/handoffcommand already exists but isn't enforced. - Context usage indicator — retort healthcheck or a session hook could warn when estimated context usage exceeds 50% of the window ("Consider starting a fresh session").
- Subagent offloading patterns — document when to use Agent tool to offload expensive research to subagents (isolated context) vs doing it inline. retort's agent team specs could include guidance on this.
- History-aware /handoff — enhance handoff to produce a minimal continuation prompt that captures decisions + state without replaying the full conversation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request