Maximizing the value of your Claude Code sessions(claude.com)
302 points by twapi 7 days ago | 177 comments
tl;dr: Claude Code sessions bill on input, output, and cached tokens, with output ~5x input and cache reads at 0.1x input — but the entire conversation gets re-sent every turn, so context bloat compounds fast. Switching `/model`, `/effort`, or running `/compact` mid-session invalidates the cache prefix and forces expensive re-prefill, while `/rewind` preserves it. To keep costs down: `/clear` between tasks, `@-mention` files instead of letting Claude search, quiet noisy commands, trim CLAUDE.md, and offload high-output grunt work to subagents.
HN Discussion:
  • ~Alternative tools like /handoff or Ollama offloading work better than the article's suggestions
  • The optimization burden shouldn't be on users; Anthropic should fix the underlying cost/caching issues
  • @-mentioning files is buggy or an antipattern that pulls in entire large files unnecessarily
  • Questions seeking technical clarification on caching behavior tied to effort or unexplained cache rewrites
  • ~Wants a smarter /clear that trims noisy artifacts while preserving conversation history