Inhale / Exhale Loops
Alternating between acquiring working context and deliberately shedding debris.
A line cook gets a ticket for a pan sauce. Out come the shallots, the stock, the butter, two pans and a tasting spoon. Ten minutes later the sauce is done, and before the next ticket she does the part nobody watches: scrapes the board, puts everything back, and keeps one thing on the counter, the sauce. A cook who skips that step is working on a pile of old ingredients by the third ticket.
Agents work in the same rhythm. To answer a question they inhale: read files, run searches, open logs. Then they should exhale: keep the conclusion and let go of the raw material that produced it. A healthy session alternates the two.
The catch is that most agent setups only know how to inhale. Nothing in a plain chat loop removes a tool result once it has arrived. The exhale has to be designed in.
In practice
Here is one breath from a coding agent chasing a login bug. The tools are invented; token counts are rough estimates.
Inhale (turns 3-9)
read_file x 6, search_code x 4 +18,400 tokens
Exhale (turn 10)
save_note("Token minted in session.ts mintToken(),
refreshed in middleware.ts. Expiry bug: the 15-minute
constant in config/auth.ts.") +40 tokens
close_results(turns=[3,4,5,6,7,8,9]) -18,000 tokens
Notice what survives: three sentences with file names, which are handles the agent can reopen if it needs the detail again. Everything else, including two files that turned out to be irrelevant, leaves the window.
Why it matters
Without exhales, a session fills with the debris of its own exploration: dead-end files, a stack trace already understood, three reads of the same config. Reasoning degrades as that noise piles up, even when the right answer is somewhere in the window. The Guide calls this attention entropyLexicon · 15Attention EntropyProgressive reasoning degradation as session debris and noise accumulate.. It is why a long session can make a mistake at turn 60 that it would never make at turn 6.
The window also has a hard limit. When it fills, many harnesses fall back on context compactionLexicon · 45Context CompactionLossy compression of a session ribbon to reclaim window capacity.: they replace older turns with an automatic summary. That is an exhale too, but a forced one, done all at once by a process that doesn't know which details mattered. Small, deliberate exhales along the way lose less.
What to do about it
H-14 Memory Metabolism is the design law for exhaling: tools and harnesses should provide explicit ways to forget, such as disposable sub-agents, closable results and structured notes. H-03 Token Hygiene & High Observation Yield makes each inhale smaller, because a tool that returns a summary plus a pointer leaves less debris to clear.
Related
A sub-agent is an exhale by construction: it inhales in its own window and returns only the result, one reason agents fork into parallel selvesLexicon · 11Parallel SelvesA single agent user forking into multiple concurrent sub-agents.. Every exhale risks dropping something that mattered, a risk the Guide calls handoff lossLexicon · 46Handoff LossDisappearance of verified facts and rationale across compaction or delegation.. Breathing is what keeps context loadLexicon · 13Context LoadTotal tokens competing for attention inside the context window., the total tokens in the window, from only ever growing.