Context Overflow and What Actually Dies - 45-Minute Session Chunks
Context Overflow and What Actually Dies
Long agent sessions do not fail all at once. They degrade gradually. The first thing to go is nuance - the agent starts ignoring edge cases it handled correctly an hour ago. Then conventions slip - naming patterns become inconsistent, error handling gets sloppy. Finally, the agent loses track of the overall goal and starts solving the wrong problem.
The fix is breaking long sessions into 45-minute chunks with explicit handoff summaries.
Why 45 Minutes
Forty-five minutes is roughly the point where a complex coding session starts accumulating enough context to pressure the window. The exact number varies by task complexity and model, but it is a reliable default.
Before 45 minutes, the agent has enough context headroom to maintain nuance. After 45 minutes, you are gambling on which details survive compression.
What a Handoff Summary Looks Like
At the end of each chunk, generate a handoff summary that captures:
- What was accomplished - Specific files changed and why
- Current state - What compiles, what is broken, what is untested
- Decisions made - Architectural choices and the reasoning behind them
- Known issues - Bugs discovered but not yet fixed
- Next steps - Exactly where the next session should start
The summary should be dense and factual. Skip the narrative. The next session needs data, not a story.
The Handoff Protocol
- At the 40-minute mark, stop implementing and start summarizing
- Write the handoff summary to a persistent file
- Commit any work in progress, even if incomplete
- Start a new session that reads the handoff file first
What Dies Without Handoffs
Without explicit handoffs, the information that dies is always the same: why decisions were made. The code itself survives in git. The reasoning behind it does not. And without the reasoning, the next session is likely to undo good decisions or repeat bad ones.
Forty-five-minute chunks with handoff summaries are not elegant. They feel like overhead. But they are cheaper than debugging the consequences of context overflow.
Fazm is an open source macOS AI agent. Open source on GitHub.