Shell failures now explain themselves in Claude Code

Claude Code weeks 24–26 in June 2026: /cd, recursive delegation, live pages, shell auto-response, and Sonnet 5.

Shell failures now explain themselves in Claude Code
Share

The June 2026 Claude Code Digest in 60 Seconds

Between June 1 and June 30, 2026, Claude Code moved from v2.1.158 to v2.1.197 — roughly 40 point releases across four weekly digests, which Anthropic distills into a handful of headline features per week on its official "What's new" pages . Read together, the log points in three consistent directions rather than one big feature.

ArcWhat it meansRepresentative changes
PortabilitySessions survive relocation and resets/cd moves the working directory without rebuilding prompt cache; /rewind now resumes across a /clear boundary
Recursive delegationMulti-agent work becomes default plumbingSub-agents spawn sub-agents, capped at five levels deep; fallback-model chains now apply to interactive runs, not just headless
Enterprise governanceSafety pushed into the autonomy layerOrg-enforced model restrictions across every entry point, destruction guards in auto mode, parameter-scoped permission rules

Quick Answer: Claude Code shipped ~40 point releases (v2.1.158–v2.1.197) in June 2026, grouped into three arcs — session portability, recursive delegation, and enterprise governance. On June 30, Claude Sonnet 5 became the default with reported promotional pricing of $2/$10 per million input/output tokens through August 31, 2026.

The month closed with a bigger shift than any single command: on June 30, v2.1.197 made Claude Sonnet 5 the default model in Claude Code, with reported promotional pricing of $2/$10 per million input/output tokens running through August 31, 2026 . That figure comes from secondary trackers rather than a first-party page, so treat the exact numbers as reported-not-verified . The sections below annotate each week in turn.

Week 24: /cd, Recursive Delegation, and the --safe-mode Entrypoint

Shell failures now explain themselves in Claude Code

Week 24 (v2.1.166–v2.1.176) was about keeping long sessions alive and diagnosable. Its headline command, /cd, moves an active run to a new working directory without rebuilding the prompt cache: the new directory's CLAUDE.md is appended as a message rather than replacing the system prompt, and --resume/--continue relocate with it . For anyone who juggles a monorepo and a scratch repo in one session, that removes the reload tax of switching context.

The debugging story is --safe-mode (and the CLAUDE_CODE_SAFE_MODE env var), which launches with every customization surface disabled — CLAUDE.md, skills, plugins, hooks, MCP servers, and custom commands/agents — while keeping auth, model selection, built-in tools, and permissions intact . The practical value is a clean bisection: if a bug vanishes in safe mode, it lives in your config surface, not the core CLI.

"A problem that disappears in safe mode points to your config, not the CLI" — a diagnostic framing drawn directly from Anthropic's Week 24 changelog.

Orchestration also matured. Sub-agents can now spawn their own sub-agents, with the subagent panel rendering the full tree and background chains capped at five levels deep to stop runaway concurrency . That depth cap arrived alongside CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 for broader orchestration, extending the "dynamic workflows" that coordinate hundreds of subagents introduced a week earlier . The five-level ceiling is the tell: recursive delegation is being treated as default plumbing, but with a guardrail against fork-bomb behavior.

Two settings round out the reliability theme. fallbackModel configures up to three fallback models tried in order when the primary is overloaded, and it now applies to interactive sessions rather than just automated runs . On the governance side, enforceAvailableModels makes an org allowlist constrain the picker, the --model flag, the /model command, and the ANTHROPIC_MODEL env var simultaneously — closing the usual gaps where a restricted model list applied to one entrypoint but not the others .

Read together, Week 24 splits cleanly by audience: individual developers gain session mobility and a fast bisection tool, while teams gain fallback resilience and an allowlist that behaves consistently across every model entrypoint. Both point at the same trajectory — longer-lived sessions and stricter control over what runs inside them.

Week 25: Live Pages, Op-Level Filtering, and the Destruction Guard

Week 25 (v2.1.178–v2.1.183) turned that trajectory outward, adding a way to share a running session and finer controls over what it is allowed to touch. The headline was Artifacts: a live, interactive page that Claude Code publishes from a session to a private claude.ai URL and updates in place as the run continues, so a reviewer watching the link sees new output without reloading . It shipped in beta scoped to Team and Enterprise plans only — individual plans were excluded as of June 2026, which fits the pattern of session-sharing features landing first where an org owns the workspace.

Quick Answer: Claude Code Week 25 (v2.1.178–v2.1.183, June 15–19, 2026) added Artifacts — live shareable session pages on Team/Enterprise beta — plus Tool(param:value) permission scoping, /config key=value from the prompt, and an auto-mode guard that blocks destructive git and Terraform commands unless you asked to discard work.

Permission rules gained parameter-level precision. Tool(param:value) syntax (v2.1.178) scopes authorization to specific invocation parameters — Agent(model:opus) matches only subagent spawns requesting the Opus tier, with * acting as a wildcard . In practice that lets an operator write one rule set that permits Opus-tier spawns while restricting others, instead of allowing or denying the Agent tool wholesale. It is the permission layer catching up to the recursive-delegation model Week 24 introduced.

/config key=value (v2.1.181) sets any setting directly from the prompt, and it works in -p non-interactive mode and via Remote Control . For anyone who had been editing a settings file mid-run to change dynamic configuration, that round-trip is gone — the change applies inline, including inside scripted -p pipelines where file edits were awkward.

The most defensive change was in Auto mode. It now blocks git reset --hard, git clean -fd, git stash drop, and terraform destroy when the user did not explicitly state intent to discard work . The guard is heuristic, keyed to stated intent rather than a blanket refusal: ask to reset the branch and it proceeds; let an autonomous run reach for those commands unprompted and it stops. That distinction matters — it targets the specific failure mode of a long autonomous session wiping uncommitted work while leaving deliberate cleanup untouched.

Week 25 reads as consolidation. Artifacts extends the longer-lived, shareable session direction; parameter-scoped rules and prompt-level config give operators sharper levers; and the destruction guard hardens the autonomy layer against its own worst case. Each lands where Week 24 left gaps.

Week 26: Shell Auto-Explanation, /rewind Past /clear, and 37% Less CPU

Shell failures now explain themselves in Claude Code

Week 26 (v2.1.185–v2.1.193) turned the shell itself into a feedback loop. The headline quality-of-life change lands in shell mode: with the ! prefix, Claude Code now responds to command output automatically (v2.1.186), so ! npm test yields an explanation of the failures without a second prompt . That response is billed like a normal prompt, and you can opt out by setting respondToBashCommands: false . For anyone who runs tests and lint inside the session, it collapses the run-then-ask-what-broke round trip into one step.

The rest of the week hardens recovery and the sandbox boundary. /rewind can now resume a conversation from before a /clear, so turn state that was previously discarded is retrievable . Background subagents now surface permission prompts in the main session instead of auto-denying them — closing a silent failure mode where a delegated process would stall or quietly abort on an authorization it could not request . A new sandbox.credentials setting blocks sandboxed commands from reading secrets, shutting the gap where a sandboxed sub-process could still pull environment variables inherited from the parent .

Two more changes round out the release. MCP server OAuth flows now run via claude mcp login <name> and claude mcp logout <name> straight from the shell (v2.1.186), bypassing the interactive /mcp menu entirely — useful for scripted setup and headless environments . And streaming responses use about 37% less CPU as of v2.1.193, a runtime efficiency gain that matters most on laptops running long sessions .

Change (version)What it doesWhy it matters
Shell auto-response (v2.1.186)! npm test explains failures automatically; billed as a prompt; off via respondToBashCommands: falseOne-step run-and-diagnose loop
/rewind past /clearResume a conversation from before a clearLost turn state is recoverable
Background auth promptsSubagents surface permission requests in main sessionNo more silent auto-denials
sandbox.credentialsBlocks sandboxed commands from reading secretsCloses inherited-env-var leak
claude mcp login/logout (v2.1.186)Runs MCP OAuth from the shellScriptable, headless-friendly
Streaming CPU (v2.1.193)~37% less CPU overheadCooler long sessions on laptops

Read as a set, Week 26 is about the developer's day-to-day surface rather than orchestration plumbing: faster feedback in the shell, cleaner recovery after a reset, no silent failures from delegated work, and a tighter secret boundary in the sandbox. See Anthropic's Week 26 digest for the full change list.

Sonnet 5 Promotion: Official Digest vs Community Tracker

Shell failures now explain themselves in Claude Code

At month-end, two releases shifted the model economics behind Claude Code. Anthropic's first-party changelog confirms that v2.1.196 (June 29) added organization default model configuration, and v2.1.197 (June 30) made Claude Sonnet 5 the new primary model in Claude Code, shipping with a native 1M-token context window . Those are the verifiable facts: a new default model, org-level control over which model teams start on, and a larger context ceiling for long sessions.

The pricing story is where sourcing gets thinner. Secondary trackers — releasebot.io and SitePoint's June 2026 feature roundup — report promotional Sonnet 5 rates of $2 per million input tokens and $10 per million output tokens, held through August 31, 2026 . That figure was not readable from a first-party pricing page at publish time, so treat it as reported-not-verified rather than confirmed. Community trackers are fast, but they are not the changelog.

Before you wire that number into a cost model, verify it against Anthropic's own pricing documentation. Promotional pages can change, get revised, or expire ahead of their stated date, and a spend forecast built on a secondary quote is only as good as the day it was scraped.

The practical planning point for production teams: the promotion is temporary. After August 31, 2026, pricing reverts to standard Sonnet 5 rates, so anyone building on Claude Code at scale should budget for the post-promotional tier now rather than the discounted one, and watch for an org-level notification when the change lands . If you have moved teams onto Sonnet 5 as the org default, the new context window and the eventual rate change both flow to every session at once — which makes the model-selection governance added in the same release (org defaults, enforced allowlists) the lever worth setting deliberately. Confirm the current numbers on the official What's new digest before committing spend.

What the June 2026 Pace Reveals About Claude Code's Direction

Read as one arc rather than four weekly digests, June 2026 shows Claude Code shifting from a single-task CLI toward durable, governed, multi-agent infrastructure. Recursive delegation is the clearest signal: nested sub-agents with a five-level depth cap shipped as default behavior in Week 24 , alongside fallback-model chains of up to three models and agent-team primitives (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1) that build on the "dynamic workflows" orchestrating hundreds of subagents introduced earlier in the month . Orchestration is no longer an opt-in experiment; it is plumbing.

"Background chains are capped at five levels deep to prevent runaway concurrency," — Anthropic Claude Code documentation, Week 24 "What's new" digest (source: code.claude.com).

Governance is being pushed into that autonomy layer, not bolted on afterward. Org-enforced model restrictions now span every entry point — the picker, --model, /model and ANTHROPIC_MODEL — auto mode blocks destructive commands like git reset --hard and terraform destroy, and OpenTelemetry response logging landed in Week 23 . Those are infrastructure investments an enterprise buyer notices, not product polish.

Portability points the same way. /cd, /rewind resuming from before /clear, and live Artifact pages that update in place imply Anthropic is designing for multi-day, shareable runs rather than one-shot prompts — a broader durability contract than the CLI's original scope .

Three open questions are worth watching: how nested agent teams behave at real scale, whether Artifacts graduate beyond their Team/Enterprise beta, and whether the promotional Sonnet 5 rates hold past August 31, 2026 or signal a permanent pricing shift . The concrete takeaway for builders: treat June's cadence as a stable direction, and set model-selection governance and depth caps deliberately now — the defaults are already assuming multi-agent, long-lived sessions.

Frequently asked questions

What does --safe-mode disable in Claude Code, and when should I use it?

--safe-mode (also triggered by the CLAUDE_CODE_SAFE_MODE environment variable) launches Claude Code with every customization surface switched off: your CLAUDE.md, skills, plugins, hooks, MCP servers, and custom commands and agents. What stays active is deliberate — authentication, model selection, built-in tools, and permission settings all keep working . Treat it as a bisect tool. If a bug disappears in safe mode, the cause lives in your configuration, not the core CLI, which narrows the search to your own config surface before you file an issue.

How does shell auto-explanation work in Claude Code, and does it cost tokens?

Prefix any command with ! to enter shell mode; once the command runs, Claude Code responds to its output and explains the result without a second prompt — so ! npm test returns an explanation of the failures directly. This shipped in v2.1.186 during Week 26 (June 22–26) and is billed at normal prompt rates, since the explanation is a model response . To opt out and keep shell mode silent, set respondToBashCommands: false in your settings file.

What is the Claude Code Artifact feature, and which plans can use it?

Artifacts publishes a live, interactive page from a Claude Code session to a private claude.ai URL that updates in place as the work continues. It headlined Week 25 (v2.1.178–v2.1.183, June 15–19) and is available in beta on Team and Enterprise plans only — not on individual or free plans as of June 2026 . Whether it graduates beyond that beta tier remains unconfirmed in the official digests.

How many levels deep can nested sub-process delegation go in Claude Code?

Background sub-agent chains are capped at five levels deep to prevent runaway concurrency, a limit introduced in Week 24 (v2.1.166–v2.1.176) alongside the ability for sub-agents to spawn their own sub-agents; the full tree renders in the subagent panel . The experimental CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 flag extends orchestration further, but it stays behind a flag as of the June 2026 digests .

Is the Sonnet 5 promotional pricing ($2/$10 per million tokens) confirmed by Anthropic?

Partially. Anthropic's first-party digests confirm that v2.1.197 (June 30) made Claude Sonnet 5 the default in Claude Code with a native 1M-token context window, and that v2.1.196 (June 29) added organization default model configuration . The specific $2/$10 per-million-token figures and the August 31, 2026 end date come from secondary trackers rather than a first-party page . Verify current rates at platform.claude.com pricing before making cost assumptions.