Claude Code: Session Management Guide and /usage Command for 1M Context

Claude Code

Anthropic published an official blog post laying out a comprehensive session management strategy for Claude Code's one-million-token context window, introducing the new /usage command and a five-way decision framework β€” continue, rewind, compact, clear, or delegate to a subagent.


Anthropic Publishes Official Session Management Guide for Claude Code

On April 15, 2026, Anthropic published a detailed blog post titled Using Claude Code: Session Management and 1M Context, authored by Thariq Shihipar, a member of technical staff on the Claude Code team. The post arrives alongside the new /usage slash command and signals that Anthropic considers session management a core competency for effective Claude Code use β€” not just a power-user trick.

The 1M Context Window and Context Rot

Claude Code operates with a one-million-token context window. While that represents a dramatic expansion over the 200K era, Anthropic's guidance makes clear that larger does not mean unlimited. Every tool call, file read, reasoning step, and conversation turn accumulates as context, and the post explicitly names the downside: context rot β€” the gradual degradation of model performance as attention spreads across an ever-growing token history. The practical implication is that a bloated session with stale debugging noise will produce worse results than a tighter session where every token in the window remains relevant.

The /usage Command

The post coincides with the release of /usage, which gives developers a real-time view of their token consumption within the current session. This makes context rot visible and actionable rather than a vague intuition about session quality.

A Five-Way Decision Framework

The core of Anthropic's guidance is a decision table for what to do at the end of each Claude turn:

Continue

Stay in the same session when existing context remains load-bearing β€” prior file reads, agreed constraints, and conversation history are all still relevant to the next step. Continuing is the right call when the task is ongoing and the context is clean.

Rewind

Claude Code's rewind feature (accessible via Esc+Esc or /rewind, aliased as /undo) lets developers jump back to any previous message and re-prompt from that point, discarding everything after it. The blog post advocates rewinding rather than correcting: instead of typing "that didn't work, try X," developers should rewind to the relevant file read and re-prompt with the learned constraint built in directly.

Compact

The /compact command summarizes the conversation and replaces it with a condensed version, freeing up context while preserving the essential narrative. It is lossy but steerable β€” developers can guide what gets retained with a hint like /compact focus on the auth refactor, drop the test debugging. This is the right move for sessions that have grown bloated but still have a coherent ongoing task.

Clear

Starting a fresh session with /clear gives zero context rot, but requires the developer to manually carry forward what matters β€” relevant file paths, ruled-out approaches, open constraints. The post frames this as the highest-effort but cleanest option for genuinely new tasks.

Subagents

When a task generates substantial intermediate output that the parent session does not need to retain β€” large searches, verification runs, isolated refactors β€” Claude Code can delegate to a subagent with its own context window. The subagent runs its full workflow and returns only its synthesized conclusion. The decision test: "will I need this tool output again, or just the conclusion?"

Operational Significance

The post treats session management as equivalent in importance to prompt engineering β€” a skill that meaningfully affects output quality. By publishing this as official guidance rather than a community tip, Anthropic is signaling that understanding compaction, context rot, and subagent delegation is expected knowledge for Claude Code users working on non-trivial projects.