Claude Code Auto Mode now works on Amazon Bedrock, Google Vertex AI, and Microsoft Foundry
Claude Code v2.1.158 extends Auto Mode to enterprise cloud providers via a single environment variable, for Opus 4.7 and 4.8 users.
Claude Code’s Auto Mode has been available to Anthropic-direct users since late March 2026, but if your team runs Claude Code through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry, you’ve been locked out until now. Claude Code v2.1.158 changes that with a single environment variable.
What Auto Mode actually does
Before getting into the setup, it’s worth being clear about what Auto Mode is, because the name undersells the specifics.
When you work in Claude Code’s default permission mode, you approve individual actions as they come up. That works well for focused tasks, but in longer agentic sessions it creates a steady stream of confirmation prompts. Over time, you either context-switch constantly or start rubber-stamping things without reading them carefully. Neither outcome is great.
Auto Mode replaces that per-action approval flow with a background classifier. Rather than asking you, a separate model (running on Sonnet 4.6) evaluates each action before it executes. It checks for three things: whether Claude is doing something beyond the scope of what you asked, whether the action targets infrastructure the classifier doesn’t recognise, and whether the action looks like it was driven by hostile content Claude encountered in a file or web page. If any of those checks flag, the action is blocked.
There’s also an input layer. Tool outputs, including file reads, web fetches, and shell output, are scanned for prompt injection before they reach Claude’s context. If something looks like an attempt to hijack behaviour, a warning is added before the result is passed along.
The classifier runs in two stages: a fast single-token filter first, then chain-of-thought reasoning only if the first stage flags something. Anthropic’s published false-positive rate on real internal traffic is 0.4%. The false-negative rate on a hand-curated test set of “overeager actions” is 17%, so it’s not a substitute for your own judgement on sensitive operations. Auto Mode is described as a research preview for exactly that reason.
What’s new in v2.1.158
Prior to this release, Auto Mode simply wasn’t available on Bedrock, Vertex, or Foundry. The error message users saw on those providers incorrectly blamed the model. That message has now been corrected to point to the opt-in variable instead, and the feature itself has been wired up properly for those platforms.
The model restriction matters: Auto Mode on these providers only works with Claude Opus 4.7 and Opus 4.8. It is not available on Haiku or Claude 3 models through third-party providers.
One other thing worth knowing on the model side: on Bedrock, Vertex, and Foundry, the aliases opus and sonnet resolve to Opus 4.6 and Sonnet 4.5 respectively. If you want Opus 4.7 or 4.8, you’ll need to specify the full model name explicitly, or set ANTHROPIC_DEFAULT_OPUS_MODEL in your environment.
How to turn it on
The opt-in is a single environment variable:
CLAUDE_CODE_ENABLE_AUTO_MODE=1
Until that variable is set, Auto Mode won’t appear in the Shift+Tab mode cycle, and defaultMode: "auto" in your settings will be silently ignored. Once it’s set, Auto Mode shows up in the cycle for every session.
For an individual developer, add it to the env block in ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_ENABLE_AUTO_MODE": "1"
}
}
To make Auto Mode the default starting mode for your sessions, also add this to your settings:
{
"permissions": {
"defaultMode": "auto"
}
}
For organisation-wide rollout, both settings can be pushed through managed settings. And if you want to prevent developers from enabling Auto Mode at all, you can set disableAutoMode to "disable" in managed settings. That gives platform teams a clean way to hold back the feature while evaluating it, or to restrict it to specific environments.
What this means for enterprise cloud users
If your organisation runs Claude Code through Bedrock, Vertex, or Foundry, this is a meaningful change. Auto Mode has been one of the more practically useful features for teams doing extended agentic work, and until now enterprise cloud deployments couldn’t access it regardless of their subscription level.
The feature is genuinely useful for dynamic, multi-step workflows: refactoring across a large codebase, building out a feature end-to-end, running a sequence of tests and fixes. For that kind of work, removing the approval overhead lets Claude keep moving without you babysitting each step.
The caveats are real though. Auto Mode reduces prompts, it doesn’t guarantee safety. Anthropic is explicit that this is a research preview, and a 17% false-negative rate on adversarial test cases means you shouldn’t use it for operations where the cost of a wrong action is high. The right mental model is: use Auto Mode for tasks where you trust the general direction and you’d be comfortable reviewing what happened after the fact, not as hands-off execution for anything touching production infrastructure or sensitive data.
The classifier latency improvements in recent releases are also worth noting. Earlier versions would sometimes return “could not evaluate this action” blocks on routine operations because the reasoning overhead was too high. That’s been reduced by limiting chain-of-thought to cases where the fast filter actually flags something.
Getting started
You’ll need Claude Code v2.1.158 or later. Check your version with claude --version and update with npm install -g @anthropic-ai/claude-code if needed. From there, set the environment variable, confirm your model is pinned to Opus 4.7 or 4.8, and Auto Mode will appear in your next session’s Shift+Tab cycle.
The official permission modes documentation has the full details on configuration options, and Anthropic’s engineering post on how Auto Mode was built is worth reading if you want to understand the classifier architecture before deploying it to your team.