Claude Code --safe-mode and -p Flag Fix: Managed Settings and Vertex Timeout

Claude Code's June 8 release adds --safe-mode, fixes slow claude -p / --print runs on Windows, hardens managed settings MCP policy enforcement, and restores a 5-minute Vertex / Foundry idle timeout.

Published via Anthropic

Archive item produced with AI assistance from the cited source and published without individual review. Editor of record: Joe Werner.

Abstract muted editorial graphic representing safe-mode isolation and enterprise gateway policy enforcement

Anthropic shipped a substantive Claude Code update on June 8, 2026. The release packs three operator-facing additions — a safe-mode flag, a session-relocation command, and a bundled-skill suppressor — alongside a cluster of enterprise MCP policy bug fixes that had caused policy enforcement gaps since install.

What changed

--safe-mode flag (and CLAUDE_CODE_SAFE_MODE env var). Starting a session with claude --safe-mode disables all customizations before the model gets context: CLAUDE.md files, plugins, skills, hooks, and MCP servers are all skipped. The flag also accepts the environment variable form, making it composable with container and CI launch scripts without touching the command line. This is explicitly intended for troubleshooting — if a session misbehaves and the operator suspects a hook or CLAUDE.md instruction, --safe-mode gives a clean baseline.

claude -p / --print on Windows. The same release also fixes a Windows regression where non-interactive claude -p runs could become slow or appear to hang while Claude Code scanned slash commands and skills. For teams running Claude Code in CI, pre-commit hooks, or scripted diagnostics, that makes --safe-mode and -p a practical pair: use claude --safe-mode -p "..." to test the base CLI path without loading project customizations.

/cd command. Users can now switch the active working directory mid-session without breaking the prompt cache. Previously, moving a long-running session to a different repo meant either a full restart or accepting cache eviction. /cd keeps the conversation context and prompt cache intact while relocating where file edits and shell commands run.

disableBundledSkills setting and CLAUDE_CODE_DISABLE_BUNDLED_SKILLS env var. Operators managing a developer fleet can now suppress Claude Code's built-in slash commands, bundled skills, and built-in workflows entirely. This matters when an organization has deployed a curated internal skill library through managed settings and wants to prevent confusion from default skills overlapping with or conflicting with internal ones.

Enterprise MCP policy bug fixes. Four enforcement gaps were closed:

  • allowedMcpServers / deniedMcpServers policies were not being enforced on reconnect, on IDE-typed configs, on --mcp-config servers during the first session after install, or before remote settings had finished loading.
  • Managed settings with any single invalid entry previously silently dropped the entire policy payload. The fix applies all valid entries and surfaces a validation error for the bad entry.
  • Managed settings using ${VAR} references in allowedMcpServers / deniedMcpServers predicates were not matching.
  • Untrusted project settings could previously set OTEL client-certificate paths without triggering a trust confirmation.

Vertex AI / Foundry idle timeout restored. A default 5-minute idle timeout on Vertex AI and Azure Foundry streams was re-added so that a stalled stream aborts rather than hanging indefinitely. Operators who want to opt out can set API_FORCE_IDLE_TIMEOUT=0.

Additional fixes in the release include: claude agents --json now includes blocked and dispatched background sessions and respects --all for completed sessions; background agents no longer ignore project-level settings env values when dispatched onto a pre-warmed worker; and CPU usage during streaming and spinner animations was reduced.

Why it matters

The MCP policy fixes address a category of enforcement gaps that could leave enterprise deployments partially exposed. If your org rolled out allowedMcpServers or deniedMcpServers in managed settings before this release, the policy may not have been fully applied on reconnect or across IDE-originated configs. Updating to the latest Claude Code and verifying enforcement through /doctor or audit logs is recommended for any fleet with active managed MCP policy.

The safe-mode flag gives platform engineers a clean escape hatch. Debugging a misbehaving skill or hook previously meant manually commenting out files, which is error-prone in shared repos. --safe-mode isolates the issue without touching the codebase.

disableBundledSkills makes Claude Code more composable for enterprises that have invested in internal skill libraries. Default skills that clash with internal naming conventions or workflow assumptions can now be cleanly suppressed at the fleet level.

The Vertex / Foundry idle timeout matters for teams using those providers through an intermediary routing layer. A stalled stream previously required external timeout logic at the gateway or client level; the restored default lets Claude Code handle it natively, reducing complexity in routing configurations that target Vertex or Foundry endpoints.

What to watch

Anthropic has been shipping Claude Code releases at a high cadence — three releases landed between June 4 and June 8. The managed-settings hardening effort appears incremental, with each release tightening a specific enforcement path. If your fleet relies on remote managed settings for policy enforcement, watch the Claude Code changelog for continued refinements.

The disableBundledSkills setting, combined with the existing managed-skills configuration, now gives operators two complementary controls: opt out of defaults globally, then selectively re-introduce only the internal skills you have vetted and tested.

Try it on TheRouter

Claude Code sessions routed through TheRouter target the Anthropic provider path. Operators using provider configuration can pin routing to Anthropic directly or configure a fallback chain that includes Bedrock or Vertex AI. If you route to Vertex AI, the restored 5-minute idle timeout applies and reduces the need for separate timeout middleware in your routing config.

For teams using managed settings to control Claude Code behavior across a shared developer fleet, the governance overview covers how operator-level settings interact with the request path and how to audit compliance.

Help & contact