Claude Code v2.1.158: Auto Mode on Bedrock, Vertex, and Foundry
Anthropic shipped Claude Code v2.1.158 on May 30, 2026, extending Auto mode to AWS Bedrock, Google Vertex AI, and Microsoft Foundry for Opus 4.7 and 4.8.
Anthropic shipped Claude Code v2.1.158 on May 30, 2026, extending Auto mode to AWS Bedrock, Google Vertex AI, and Microsoft Foundry for Opus 4.7 and 4.8.
What Changed Today
On May 30, 2026, Anthropic published Claude Code v2.1.158, a small but strategically meaningful release that extends Auto mode — the long-running, continuous task execution mode for Claude Code — to three additional cloud platforms: AWS Bedrock, Google Vertex AI, and Microsoft Foundry. The expansion specifically targets Claude Opus 4.7 and the newly launched Opus 4.8, the two highest-capability Claude models available today.
Previously, Auto mode was generally available only when Claude Code talked to the first-party Claude API. Teams running Claude Code through their cloud provider of choice — typically driven by procurement, data residency, billing consolidation, or existing IAM controls — could not use Auto mode, leaving them with shorter sessions and more manual continuation prompts. The v2.1.158 release closes that gap.
The release is opt-in. To enable it, users set a single environment variable before launching Claude Code:
CLAUDE_CODE_ENABLE_AUTO_MODE=1
No other configuration changes, beta headers, or version bumps to Bedrock/Vertex/Foundry endpoints are required on the user's side. The flag is the only switch.
Feature Overview
Auto Mode, Now Cross-Cloud
Auto mode is Claude Code's continuous execution mode for long-horizon tasks. Instead of stopping after each turn for user approval, the agent keeps running until it reaches a defined outcome, hits a budget, or encounters an explicit stop condition. It is the operational backbone for overnight refactors, large-scale codebase migrations, and multi-step engineering tasks that exceed a single human's attention span.
Until this release, teams on Bedrock, Vertex, or Foundry had to either fall back to manual mode (with the resulting interruptions) or run a parallel deployment against the first-party Claude API just to get Auto mode. v2.1.158 collapses that to a single flag, regardless of which cloud is fronting the model.
Opus 4.7 and Opus 4.8 Coverage
The release explicitly names Opus 4.7 and Opus 4.8 as the supported models. Opus 4.8 launched two days earlier on May 28, 2026, as Anthropic's most capable generally available model, with a 1M token context window by default, 128k max output tokens, and adaptive thinking that triggers reasoning only when needed. Opus 4.7, launched April 16, 2026, remains the cost-and-capability sweet spot for many production agentic workloads.
Pairing Auto mode with Opus 4.8's 1M context window is the practically interesting combination. Long-horizon coding tasks frequently fail not because the model lacks intelligence, but because the agent loses context across the session. A 1M context window combined with adaptive thinking and Auto mode produces sessions where the model can maintain state across hours of work without aggressive context editing.
Cloud-Native Distribution
The three platforms targeted reflect the dominant enterprise routes to Claude:
- AWS Bedrock — Generally available to all Bedrock customers since April 16, 2026, served through
/anthropic/v1/messagesin 27 AWS regions. - Google Vertex AI — Anthropic's long-standing GCP distribution channel, with regional and global endpoint pricing.
- Microsoft Foundry — Anthropic's Azure distribution route, launched November 18, 2025, with Azure billing, OAuth authentication, and access to the full Messages API.
With Auto mode now available on all three, every major cloud has parity with the first-party Claude API for long-running agentic coding workloads.
Opt-In Flag Design
The choice to gate Auto mode behind an environment variable is consistent with Anthropic's recent rollout pattern for capabilities that can incur higher costs or longer running sessions. Treating Auto mode as an opt-in lets administrators control which projects or CI environments can spawn long-running agents, without changing default behavior for existing users.
For teams with cost guardrails, the flag also makes it straightforward to scope Auto mode to specific workspaces or pipelines via standard environment variable controls in shell profiles, CI runners, or Kubernetes pod specs.
Usability Analysis
For individual developers, the practical effect is straightforward: if your organization routes Claude Code through Bedrock, Vertex, or Foundry rather than the first-party API, you can now run long-horizon Auto mode sessions where you previously could not. Set the environment variable, restart Claude Code, and the behavior matches what first-party API users have had for weeks.
For platform teams, the release reduces a recurring source of friction. Teams that standardized on a specific cloud provider for procurement reasons no longer face a feature gap on agentic workloads. The fragmentation between first-party API users and cloud-routed users — which previously required either dual deployments or feature-detection logic in tooling — is materially reduced.
For enterprise IT, the opt-in model preserves administrative control. Auto mode can run unattended for extended periods, and the per-session cost can be higher than a typical interactive session. The environment variable gate makes it trivial to keep the feature off by default and enable it explicitly for approved use cases.
Pros and Cons
Strengths:
- Eliminates the longstanding Auto mode gap between the first-party Claude API and the three major cloud distribution channels
- Single-flag opt-in keeps the rollout safe and auditable for enterprise environments
- Pairs naturally with Opus 4.8's 1M context window for sustained long-horizon coding work
- No changes required on the Bedrock, Vertex, or Foundry side — the flag lives entirely client-side in Claude Code
- Consistent administrative model with prior opt-in flags reduces the cognitive load on platform teams
Limitations:
- Limited to Opus 4.7 and Opus 4.8 — teams running Sonnet or Haiku for cost reasons do not yet get Auto mode on these platforms
- Auto mode sessions can rack up notable token costs on Opus-tier models, especially with large 1M context windows; cost monitoring becomes important
- The opt-in model means individual developers need their environment configured correctly; misconfiguration silently leaves Auto mode off
- Release notes are intentionally brief; subtle behavioral differences across the three clouds may surface only in real-world use
Outlook
The v2.1.158 release continues a pattern Anthropic has been executing throughout the spring of 2026: each Claude Code point release closes a specific gap between the first-party API and the cloud-routed deployments. Auto mode on Bedrock, Vertex, and Foundry was one of the last remaining capability differences between routes.
The broader signal is that Anthropic now treats the cloud distribution channels as first-class production surfaces for Claude Code, not just convenience integrations. As more enterprise teams standardize on Bedrock, Vertex, or Foundry for compliance reasons, parity releases like this lower the cost of choosing a cloud route. The likely next step is bringing Auto mode to Sonnet and Haiku on the same three platforms, which would put the entire model family at full feature parity across all four distribution channels.
For competing agentic coding tools, the release reinforces that the battle is shifting from raw model capability to the operational depth of the agent harness around the model — Auto mode, session management, sandboxing, and cross-cloud distribution. A model that performs marginally better in isolation matters less when the surrounding harness has weeks or months of operational lead time.
Conclusion
Claude Code v2.1.158 is not a headline release, but it is the kind of incremental capability work that matters for production teams. By extending Auto mode to AWS Bedrock, Google Vertex AI, and Microsoft Foundry for Opus 4.7 and Opus 4.8, Anthropic removes one of the last remaining reasons for an organization to choose the first-party Claude API over a cloud route purely on feature grounds. Teams already on those clouds should evaluate whether enabling the opt-in flag in their CI pipelines or developer environments unlocks workflows they previously had to break up into manual sessions. For everyone else, the release is a reminder that the operational substrate around Claude Code is maturing faster than the model release cadence alone would suggest.
Editor's Verdict
Claude Code v2.1.158 earns a clear recommendation for any team running Claude Code through AWS Bedrock, Google Vertex AI, or Microsoft Foundry on Opus 4.7 or Opus 4.8.
The strongest case for paying attention is the parity it establishes across cloud distribution channels: organizations no longer need to choose between their preferred cloud's billing and IAM model and Claude Code's most useful long-horizon execution mode. Reinforcing that, the opt-in environment variable design keeps administrative control firmly in platform teams' hands rather than flipping behavior by default. The broader signal worth registering is straightforward: Anthropic is steadily closing the gap between the first-party Claude API and the cloud distribution channels — a positive trend for any team that picked a cloud for non-feature reasons. On the other side of the ledger, the release is limited to Opus-tier models, which means cost-sensitive deployments running Sonnet or Haiku do not benefit yet. Layered on top of that, Auto mode on Opus models with 1M context can drive notable token spend, so cost monitoring should accompany rollout.
For platform engineering teams managing Claude Code at scale on Bedrock, Vertex, or Foundry, this is an evaluate-and-roll-out release, not just a changelog entry. For everyone else, the safer posture is to track the cadence of these parity releases and revisit when Sonnet and Haiku join the list.
Pros
- Closes the Auto mode feature gap between the first-party Claude API and AWS Bedrock, Google Vertex AI, and Microsoft Foundry
- Single-flag opt-in keeps administrative control with platform teams and makes the rollout auditable
- Compatible with Opus 4.8's 1M token context window, supporting long sessions without context editing trade-offs
- No Bedrock/Vertex/Foundry-side configuration required, lowering the operational cost of adoption
- Consistent with prior opt-in flag patterns, reducing the cognitive load on existing Claude Code administrators
Cons
- Limited to Opus 4.7 and Opus 4.8; teams running Sonnet or Haiku for cost reasons do not yet get Auto mode on these clouds
- Auto mode on Opus-tier models with 1M context can drive notable token costs and requires cost monitoring
- Misconfigured environment variables silently leave Auto mode off, which can confuse individual developers expecting it to be on
- Brief release notes leave subtle behavioral differences across the three clouds to be discovered in real-world use
References
Comments0
Key Features
1. Auto mode on AWS Bedrock: enables long-horizon continuous execution for Claude Code sessions routed through Amazon Bedrock 2. Auto mode on Google Vertex AI: extends the same continuous execution capability to Vertex-routed deployments with regional and global endpoint pricing 3. Auto mode on Microsoft Foundry: brings the feature to Azure-routed Claude Code with Azure billing and OAuth authentication intact 4. Claude Opus 4.7 and Opus 4.8 support: targets Anthropic's two highest-capability generally available models, including Opus 4.8's 1M token default context window 5. Opt-in via single environment variable (CLAUDE_CODE_ENABLE_AUTO_MODE=1): keeps the rollout safe, auditable, and easy for platform teams to scope to specific projects or CI environments
Key Insights
- Auto mode parity across Bedrock, Vertex, and Foundry effectively eliminates the last major feature gap between the first-party Claude API and the three dominant enterprise cloud routes
- The release pairs naturally with Opus 4.8's 1M token default context window, enabling sustained long-horizon coding sessions without aggressive context editing
- Opt-in via environment variable preserves administrative control, allowing platform teams to scope Auto mode to approved projects or pipelines without changing default behavior
- Limiting initial support to Opus 4.7 and 4.8 signals that Anthropic is sequencing parity releases by model tier rather than by cloud, with Sonnet and Haiku likely to follow
- The cadence of point releases that close cloud-route gaps suggests Anthropic now treats Bedrock, Vertex, and Foundry as first-class production surfaces rather than convenience integrations
- For competing agentic coding tools, the focus is shifting from raw model capability to the operational depth of the harness around the model — session management, sandboxing, and cross-cloud distribution
- No server-side changes are required on Bedrock, Vertex, or Foundry; the flag is entirely client-side in Claude Code, simplifying the rollout path
Was this review helpful?
Share
Related AI Reviews
Claude Opus 4.8 Launches: Dynamic Workflows Orchestrate Hundreds of Parallel Agents
Anthropic released Claude Opus 4.8 on May 28, 2026, introducing Dynamic Workflows that coordinate up to 1,000 subagents per run, a 69.2% SWE-bench Pro score, and a threefold drop in Fast Mode pricing.
Project Glasswing One-Month Update: Claude Mythos Finds 10,000+ Critical Vulnerabilities
Anthropic's Project Glasswing reported on May 22 that Claude Mythos Preview discovered over 10,000 high/critical-severity vulnerabilities across critical software in just one month, with partners including Apple, Google, Microsoft, and Cloudflare.
SAP and Anthropic at Sapphire 2026: Claude Becomes the Primary Reasoning Engine for the Autonomous Enterprise
At SAP Sapphire 2026, SAP unveiled its Autonomous Enterprise vision with 200+ AI agents, naming Claude as its primary reasoning and agentic capability across the SAP Business AI Platform.
KPMG and Anthropic Sign Global Alliance: Claude Powers 276,000 Employees via Digital Gateway
KPMG has signed a global strategic alliance with Anthropic, embedding Claude AI into its Digital Gateway platform and giving all 276,000+ employees access to agentic AI workflows.
