ELSEIF
Your brief EB
283 stories from 101 feeds 312 clusters Refreshed 1 minute ago next pull 19:07

AI Signal 495

Claude Code guide recommends /clear between tasks and /compact before breaks to cut token costs

Anthropic published guidance on reducing token costs in Claude Code sessions through context management, prompt cache preservation, and effort level discipline.

WHY IT MATTERS

Claude Code bills per token, with output tokens priced at roughly 5x input tokens, so the same task can cost different amounts depending on how much irrelevant context accumulates. These practices directly affect the per-task cost of using agentic coding tools, which unlike traditional editors carry a variable price per completed piece of work.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

Running /clear between tasks prevents irrelevant prior context from being sent back to the model, reducing token usage.

02

Changing model or effort level mid-conversation can invalidate the prompt cache, increasing token cost.

03

Running /compact before a break preserves session state cheaply, since the prompt cache expires after an hour.

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
claude.com via Hacker News Maximizing the value of your Claude Code sessions Open ↗