Claude Code · Week 24 Digest
Claude Code Week 24: fallbackModel, Safe Mode, and /cd for Production Resilience
Claude Code's June 2026 Week 24 update shipped four features that matter most to teams running agents at scale: fallbackModel chains, --safe-mode troubleshooting, /cd workspace switching, and nested sub-agents five levels deep.
Most Claude Code releases earn a changelog entry and move on. Week 24 (June 8–12, 2026, versions 2.1.166–2.1.176) quietly shipped four features that close the gaps teams were working around in production: rate limits killing overnight runs, mysterious behavior triggered by a rogue hook, the cache-busting tax of switching directories mid-session, and sub-agent pipelines hitting an artificial depth ceiling. Every team running Claude Code at scale should update and configure all four this week.
3
fallback models in chain
tried in order before any error surfaces
5
sub-agent nesting levels
background chains capped at depth 5
0
cache tokens rebuilt on /cd
prompt cache fully preserved mid-session
The four features that shipped
The Week 24 digest covers everything in detail, but the four headline items are:
fallbackModel— configure up to three backup models tried in order when the primary model is rate-limited or unavailable.--safe-mode— launch Claude Code with all customizations bypassed: CLAUDE.md files, hooks, plugins, and bundled skills are all disabled./cd— move the current session to a different working directory without rebuilding the prompt cache.- Nested sub-agents — sub-agents can now spawn their own sub-agents, with background chains capped at five levels deep.
These are not cosmetic. Let's walk each one in depth.
fallbackModel: never get rate-limited mid-session
Before Week 24, a rate limit on your primary model meant one thing: the session stopped and you waited. For interactive sessions that's annoying. For overnight agent runs or CI pipelines, it meant a failed job and a morning full of re-runs.
fallbackModel changes this. You configure a ranked list of up to three backup models in .claude/settings.json. When the primary model returns a rate-limit or availability error, Claude Code transparently retries with the next model in the chain—no session restart, no lost context, no user prompt required.
{
"model": "claude-opus-4-8",
"fallbackModel": [
"claude-sonnet-4-6",
"claude-haiku-4-5-20251001"
]
}The fallback is transparent to skills and sub-agents—a running pipeline won't know the switch happened unless you check the session log. Crucially, the prompt cache is preserved across the switch, so you don't pay re-tokenization costs when the fallback takes over.
For teams on Bedrock or Vertex, combine fallbackModel with the multi-region routing that landed in Week 23—auto mode is now available on third-party providers for Opus 4.7 and 4.8. Together they produce genuinely resilient agent runs that can survive both model-level and region-level outages without intervention.
--safe-mode: the troubleshooter's best friend
Claude Code loads a lot of configuration at startup: project and user-level CLAUDE.md files, hooks, plugins, MCP servers, and bundled skills. When something misbehaves—unexpected behavior, a session loop, a crash at startup—diagnosing whether the issue is Claude itself or a piece of configuration was previously slow and painful.
--safe-mode solves this cleanly. The flag bypasses every customization layer and starts a vanilla session:
# launch without any customizations
claude --safe-mode
# combine with a specific model for tighter isolation
claude --safe-mode --model claude-sonnet-4-6If the problem disappears in safe mode, the culprit is in your configuration stack. Bisect by re-enabling layers one at a time: hooks first (the most common source of infinite loops), then plugins, then CLAUDE.md, then bundled skills.
/cd: workspace switching without cache penalty
Before this update, switching working directories mid-session meant starting a new session (losing context) or shelling out with cd(which works for shell commands but doesn't update Claude's understanding of the working tree). Neither option was good.
/cdsolves this properly. It moves the session root to a new directory, updates Claude's file-system context, and—critically—does not rebuild the prompt cache. Accumulated context stays intact.
# you're debugging a Fastify route in apps/api
/cd ../web
# now in apps/web — Claude understands the new directory tree
# all prior context preserved, no re-tokenization costThe canonical use case is monorepo work: debug a backend issue, then switch to the frontend to wire the UI change, without opening a second session and re-establishing context. It works equally well for multi-repo setups where both repos are checked out locally.
Nested sub-agents go five levels deep
The original sub-agent implementation limited nesting to one level: a parent could spawn children, but children could not spawn grandchildren. For most workflows that was sufficient. For deep recursive analysis—drill from repo to module to file to function to test case—it was a hard constraint.
Week 24 removes that constraint. Sub-agents can now spawn their own sub-agents, with background chains capped at five levels deep. The cap is deliberate: unconstrained nesting would make token accounting and failure tracing intractable.
---
name: deep-analyzer
description: Recursively analyzes a module, spawning child analyzers per file.
tools:
- Read
- Bash
---
Analyze $1 at three levels: module summary → per-file findings →
per-function hotspots. Spawn a file-analyzer sub-agent for each
source file. Each file-analyzer may spawn a function-analyzer for
functions with cyclomatic complexity > 10.
Depth constraint: file-analyzers are level 2, function-analyzers
are level 3. Do not spawn further. Report findings up the chain
with structured JSON summaries.One practical change the new depth enables: sub-agents can now implement the specialist + critic pattern recursively. A domain specialist at level 2 can spin up its own adversarial reviewer at level 3 without burdening the top-level orchestrator. This is particularly useful for security audits and migration pipelines where you want adversarial review built in at every layer.
The production-grade setup
Combine all four features and you get a setup meaningfully more robust than anything possible before Week 24. Here is the baseline configuration we now ship for any autonomous agent running overnight or in CI:
{
"model": "claude-opus-4-8",
"fallbackModel": [
"claude-sonnet-4-6",
"claude-haiku-4-5-20251001"
],
"autoMode": true,
"disableBundledSkills": false,
"hooks": {
"PreToolCall": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "echo "[tool] $CLAUDE_TOOL_NAME" >&2"
}
]
}
]
}
}When something misbehaves with this config, the debugging flow is now clean:
- Run
claude --safe-modeto confirm the issue isn't from a hook or plugin. - If safe mode is clean, re-enable hooks first and inspect
PreToolCallstderr output. - Switch directories with
/cdrather than restarting—your debug context stays intact. - If the primary model rate-limits mid-debug,
fallbackModelkeeps the session alive automatically.
Sub-agents can spawn their own sub-agents (background chains are capped at five levels deep);--safe-modestarts Claude Code with all customizations disabled for troubleshooting; andfallbackModelconfigures up to three fallback models tried in order.
Update to the latest release to get all four features:
npm install -g @anthropic-ai/claude-code@latest
claude --version # expect 2.1.176 or higherIf you are building multi-level sub-agent pipelines, browse the composition catalog at skills-hub.ai/browse?category=combo for published pipelines that already use the five-level depth correctly, or install the fallback-model-setup skill to audit and configure your project automatically.
Written by
Skills-Hub Team
Anthropic ecosystem coverage
Skills-Hub is the open registry for AI coding skills, 4,400+ SKILL.md files synced daily from Anthropic, Google, Microsoft, and 90+ official sources. Free + MIT.