Context & Reasoning/Context Engineering
Intermediate7 min

Compact, Branch, or Clear — A Decision Framework

Three commands for managing a degrading session — each with a different cost, a different loss profile, and a different use case. Choosing the wrong one compounds the problem.

Quick Reference

  • /compact: summarize and continue — cheap, lossy, same session
  • /branch: fork to a new session keeping key context — explore alternatives without destroying the thread
  • /clear: full reset — cheapest fresh start, loses everything
  • Signs of session degradation: repeated wrong assumptions, same correction needed 3+ times
  • Compact at ~60% context utilization — before quality degrades, not after
  • Branch when you liked the direction but want to try an alternative approach
  • Clear when switching to a completely unrelated task
  • 300-second rule: if you step away for 5+ minutes, the prompt cache is cold — /clear is now cheap

The Three Tools

When a session is under context pressure or heading in the wrong direction, you have three distinct responses. Each one makes a different tradeoff between cost, continuity, and cleanliness.

CommandWhat it doesWhat you loseWhen to use
/compactSummarizes conversation history to reclaim budget; session continuesDetail from older turns — granular instructions, specific error messagesContinuing the same task; context is full but work is good
/branchForks the session — original stays untouched, you work on the forkNothing — original session is preservedExploring an alternative approach without destroying the current thread
/clearWipes the entire conversation; fresh session, zero context costEverything — all conversation history, context, progress from this sessionSwitching to an unrelated task; session is so polluted a fresh start is faster