claude.com via Hacker News

Anthropic's Hallie: Claude Code Bills Hinge on Session Habits

Anthropic Coding Tools ai-business

TL;DR

  • Anthropic engineer Lydia Hallie argues identical Claude Code fixes can cost very different token amounts depending on how a session is managed.
  • Core tips: /clear between tasks, @-mention files to skip Read calls, and set model and effort upfront to avoid busting the prompt cache.
  • The prompt cache expires after an hour on a subscription and five minutes on an API key, so /compact before breaks.

A short post from Anthropic engineer Lydia Hallie makes a claim that will land differently depending on how much you spend on inference: two developers can fix the same bug in Claude Code and be billed very different amounts, because context management is now part of the job. "It's the same fix, but you spent a different number of tokens on it," she writes in Anthropic's guide, published August 14.

The recipe is a handful of small habits. Run `/clear` between tasks so prior irrelevant context stops being sent back to the model. `@-mention` files instead of naming them, because the file gets attached to the message directly and saves a Read call. Set model and effort level before you start, since changing either mid-conversation can bust the prompt cache. Add quiet flags to noisy commands, or run them in a subagent, because command output stays in the conversation just like a file. And run `/compact` before you step away from the keyboard, because "the prompt cache expires after an hour on a subscription or five minutes on an API key."

Underneath the tips is a cost equation most developers never see spelled out. Input tokens are already cheaper than output tokens by around five times; cached reads run at a tenth of the input price, while writing to cache can cost up to double. Session cost compounds, because turn 40 is also re-reading the 39 turns before it. On an API key, the five-minute cache window means an idle coffee break can quietly turn what felt like one session into two paid ones.

The post is Anthropic's own guidance, so it does not benchmark these habits against Cursor or Codex, and it does not put a dollar figure on how much any single tip saves. Hallie also does not say whether the same rules of thumb hold for the IDE plugins or the web app versus the CLI. The advice is workflow discipline, not a discount.

For teams whose Claude Code bills have started to look like a real line item, the interesting thing is that the fix is free: better session hygiene, not a smaller model. It lands during a busy stretch for both Anthropic and the coding-tool space more broadly, where per-token efficiency is quietly becoming an axis of competition. Our tracker logged 339 Anthropic stories in the last 90 days, including today's IPO revenue pitch.