Using Claude Code: Session Management & 1M Context
- Source
- x.com
- Author
- Thariq
- Date

Context
A long coding conversation can preserve useful discoveries alongside failed approaches and unrelated work. In a session-management guide, Thariq explains two ways to choose what Anthropic's Claude Code carries forward: summarize the existing conversation, or start a fresh session with a deliberately written handoff.
asks the model to select and summarize what mattered. A fresh-session handoff lets the user specify the remaining task, constraints, relevant files and rejected approaches. The choice depends on what the next task needs. Thariq's rule of thumb is to start a new session for a new task, while a closely related follow-up, such as documenting a feature that was just built, may justify keeping the existing so files need not be reread.
- Rewind beats correcting. Typing 'that didn't work, try X' leaves the failed attempt sitting in context; double-tapping Esc drops every message after the point you jump to, so you re-prompt from the file reads with what you learned and none of the wreckage.
- Before you rewind, ask Claude to 'summarize from here'. You get a handoff note from the attempt that failed — effectively a message to the next iteration of Claude explaining what was already ruled out.
- Compact and clear trade the same thing in opposite directions. Compact is lossy but free: Claude decides what mattered, and you can steer it ('/compact focus on the auth refactor, drop the test debugging'). Clear costs you writing the brief, and the survivors are your pick.
- The one-session-per-task rule has an exception for genuinely adjacent work. Documenting a feature you just built in a fresh session means Claude re-reads the same files — slower and more expensive than carrying the context over.
- context compaction — Summarizing an agent's earlier conversation to free room in the context window so a long session can keep going.
- context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
- token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
“Context rot is the observation that model performance degrades as context grows because attention gets spread across more tokens, and older, irrelevant content starts to distract from the current task.”
“If I had to pick one habit that signals good context management, it’s rewind.”
“Our general rule of thumb is when you start a new task, you should also start a new session.”
Checking sign-in…
Loading comments…





