Maximizing the value of your Claude Code sessions
TL;DR Highlight
Using /clear, @-mentions and cache-aware habits makes Claude Code finish the same work with fewer tokens.
Who Should Read
A developer who uses Claude Code daily and burns through token limits or costs too quickly.
Core Mechanics
- Three things set a token's price
- Model, input vs output, and cached or not decide the price.
- Output is priced at roughly 5x input.
- Many output tokens are thinking tokens, and /effort controls how many.
- Cache reads cost 0.1x input price
- If a request starts with the same tokens as before, the server reuses the stored state (prompt caching).
- Writing to the cache costs up to 2x normal input.
- A write happens once per token, while the 0.1x reads happen on every later turn.
- Switching model or effort busts the cache
- /model and /effort are part of the cache key, so changing mid-conversation re-prefills the whole conversation.
- Fast mode is also part of the key, and the re-prefill is billed at fast mode prices.
- The cache expires after an hour on a subscription or five minutes on an API key (ENABLE_PROMPT_CACHING_1H=1 makes it an hour).
- Everything in context is resent every turn
- Files read and command outputs are sent again on every later turn.
- Resends are cheap thanks to caching, but not free, and they take up room the model must think around.
- Turn 40 re-reads the 39 turns before it, so long sessions cost more.
- @-mention saves a Read call
- The file is attached to the first request, so no Read call is needed.
- @-mentioning it again on a later turn generally attaches a second copy.
- Quiet noisy commands or send them to a subagent
- Output over 30,000 characters is written to a file with only a preview and path in the conversation.
- Smaller output, like 400 passing test lines, stays and rides along on every remaining turn.
- A subagent uses its own context and returns only its answer to the main session.
Community Reactions
- A /handoff skill as an alternative
- Commenters say it saves key session context to a short file and starts a fresh session with /continue.
- One reports better results doing this every ~20 messages than running long sessions.
- Question why the cache is tied to effort
- One commenter asks whether effort could be a decoding-only setting.
- They say follow-up questions after hard analysis need less effort, but switching is costly.
- Pushback that @-mention is an antipattern
- One view is that large files get fully loaded, while Read can target only the relevant part.
- Another reports @ search in the desktop app returns worse results than the CLI.
- Unexplained cache write spikes
- One user with a 1h TTL and no model or effort changes saw cache writes grow from 400K to 800K and 2M.
- They noticed it around /btw and code review requests.
- Criticism that this shifts burden to users
- Several say the harness should handle this automatically.
- Some call it Anthropic's version of 'you're holding it wrong'.
How to Apply
- Check /context, /model and /effort today
- Open a fresh session and run /context to see what CLAUDE.md and MCP tool definitions take up.
- Turn off unused MCP servers via /mcp and confirm /model and /effort are deliberate.
- /clear per task and /rename if you'll return
- Run /clear before starting new work, and /rename first if you may want the session back.
- When the earlier part of a task is done, run /compact and say what to keep.
- Put quiet commands in CLAUDE.md
- Add your 2-3 daily commands with quiet flags (e.g. npx vitest run <file> --reporter=dot).
- For big-output jobs like log review, tell Claude to do it in a subagent.
- /compact before breaks, switch models at session start
- If you'll be away over an hour, run /compact while the cache is still warm.
- Change model, effort or Fast mode at session start or right after /clear.
Try It
# Paste into a fresh Claude Code session (a simple prompt version of the article's tips)
/context
Based on the result above, answer in this format.
1. Items loaded at startup that look unnecessary for this task (CLAUDE.md sections, MCP servers)
2. Workflow-specific instructions in CLAUDE.md that should move into skills
3. A draft CLAUDE.md snippet for the commands I use all day {{2-3 frequent commands}}, with quiet flags
Next: turn off unneeded servers with /mcp, and run /clear before your next task.Terminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls