Claude Code does not clear context between stages?
Ran a four-stage audit pipeline (my first real ICM build), assuming each stage got a fresh window. Nope. After the full run: 302.8k tokens — 281.3k of it transcript. Everything I engineered (CLAUDE.md, contracts, skills) was 25k. My architecture: 8% of the window. The chatter: 92%.
One /clear: down to -282k. Messages: 137 tokens. It picked the run back up from the stage output folders without asking me anything, because my CLAUDE.md tells a fresh session to orient from artifacts, never from the conversation. (Protocol block in the comments if you want it.)
So the files hold the state, but to run /clear, I have to do it between the stages? How are y'all automating the clear between stages? By hand at every gate? A wrapper running each stage as its own `claude -p`? Something else?
Or does it not matter?
6
11 comments
Duane Garnes
4
Claude Code does not clear context between stages?
Clief Notes
skool.com/cliefnotes
What we give away free beats most paid courses. Build durable AI systems with a Marine vet and Edinburgh researcher. 40+ lessons, growing.
Leaderboard (30-day)
Powered by