Anthropic releases /usage command and context management guide for Claude Code, helping developers navigate 1 million token sessions more effectively. (Read MoreAnthropic releases /usage command and context management guide for Claude Code, helping developers navigate 1 million token sessions more effectively. (Read More

Anthropic Unveils Claude Code Session Tools for 1M Token Context

2026/04/16 08:53
3 min read
For feedback or concerns regarding this content, please contact us at [email protected]

Anthropic Unveils Claude Code Session Tools for 1M Token Context

Lawrence Jengar Apr 16, 2026 00:53

Anthropic releases /usage command and context management guide for Claude Code, helping developers navigate 1 million token sessions more effectively.

Anthropic Unveils Claude Code Session Tools for 1M Token Context

Anthropic dropped a new /usage command for Claude Code on April 15, alongside detailed guidance on managing sessions within the AI coding assistant's one million token context window. The update addresses a growing pain point developers have flagged: figuring out when to continue, compact, or nuke a session entirely.

The company's technical staff member Thariq Shihipar laid out the logic in a blog post that reads more like tribal knowledge than typical documentation. The core problem? Context rot—where model performance degrades as more tokens pile up and attention gets spread thin across irrelevant cruft.

Five Ways to Handle Context Bloat

Claude Code now offers developers a decision tree at every turn:

Continue works when everything in the window still matters. /rewind (or double-tap Esc) lets you jump back to any previous message and reprompt, dropping everything after that point. Anthropic suggests this beats the instinct to type "that didn't work, try X instead"—instead, rewind to just after useful file reads and give cleaner instructions.

/compact asks Claude to summarize the session and replace history with that summary. It's lossy but automatic. You can steer it: "/compact focus on the auth refactor, drop the test debugging." The catch? Autocompact fires when context is nearly full, precisely when the model performs worst due to context rot.

/clear puts you in control. You write what matters and start fresh. More work, cleaner slate.

Subagents handle the messiest scenario—when the next chunk of work will generate tons of intermediate output you won't need again. Spawning a subagent gives it a fresh context window; only the final report comes back to the parent session.

The Mental Model

Anthropic's internal test: "Will I need this tool output again, or just the conclusion?" If just the conclusion, spin up a subagent for codebase searches, verification runs, or doc writing.

The guidance suggests starting fresh sessions for genuinely new tasks, even though 1M context technically allows marathon sessions. For related follow-up work—like documenting a feature you just built—staying in session avoids expensive file rereads.

Bad autocompacts typically happen when Claude can't predict where your work is heading. A long debugging session gets summarized, then you ask about "that other warning in bar.ts" that got dropped from the summary. With the larger context window, Anthropic recommends proactive /compact with explicit direction before the automatic trigger fires.

The update reflects Anthropic's push to make Claude Code more practical for extended development sessions. Whether this moves the needle on enterprise adoption remains to be seen, but developers burning through context on complex codebases finally have documented strategies beyond trial and error.

Image source: Shutterstock
  • anthropic
  • claude code
  • ai development
  • context management
  • developer tools
Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact [email protected] for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

USD1 Genesis: 0 Fees + 12% APR

USD1 Genesis: 0 Fees + 12% APRUSD1 Genesis: 0 Fees + 12% APR

New users: stake for up to 600% APR. Limited time!