Been using Claude Code heavily for the past few months. Started noticing something weird on longer sessions the agent would start making decisions that contradicted things it had done earlier in the same session. Applying fixes to files it had already touched. Ignoring rules I had explicitly set at the start. Took me embarrassingly long to figure out what was happening. Every tool call feeds its output back into the next one as input tokens. By turn 30 you are not just paying for turn 30. You are paying for everything that happened in turns 1 through 29, all over again. The context just keeps growing and the agent starts losing the thread. Once I understood that I got a lot more deliberate about how I structure sessions. Smaller tasks. compact at natural boundaries before things degrade . claudeignore to stop the agent reading files it has no business touching. Curious how others handle this. Do you actively manage context on long sessions or just let it run and deal with the degradation when it happens? submitted by /u/Sree_12121
Originally posted by u/Sree_12121 on r/ClaudeCode
