groundy
agents & frameworks

Claude Code Auto Mode Is Broken: What to Gate Before Running Opus 5 Unattended

A claimed bypass of Claude Code Opus 5 auto mode highlights that permission prompts are advisory, not security boundaries. Move enforcement to runtime sandboxing, scoped creds

11 min···3 sources ↓

A write-up attributed to researcher Embrace the Red claiming a demonstrated break of Claude Code Opus 5’s auto mode hit the front of Hacker News on 2026-09-01 [unverified, neither the write-up, a reproduction, nor any Anthropic statement could be confirmed in fetched sources]. If the claim holds, the operational answer is the same either way: treat the harness permission layer as advisory UX, and move enforcement to sandboxing, scoped credentials, and egress control at the runtime.

What does the Embrace the Red write-up claim, and what is still unverified?

The claim, as it circulated on 2026-09-01, is that an attacker steering a prompt can drive Claude Code running Opus 5 in auto mode past its approval gates during unattended execution. Everything beyond that sentence is currently single-source.

The specific attack chain, the affected Claude Code versions, whether the bypass is reproducible, and Anthropic’s response (if any) could not be verified against any fetched document as of 2026-09-01. That the thread reached the Hacker News front page tells you the claim got attention. It says nothing about technical validity; front-page placement has historically rewarded a good headline about a popular tool as readily as a sound proof of concept.

What can be verified is narrower. The target’s lineage is real: Anthropic’s model lineup includes an Opus tier, and Claude Code is among its shipped services. What cannot be verified from any fetched source is the specific model version named in the claim or its release timing. The configuration being attacked is also widespread: Claude Code is available across Free, Pro, Max, Team, and Enterprise plan tiers, with some features gated to paid plans, which means auto mode is available to individual developers with no enterprise control plane between the model and their filesystem. A claimed bypass against that exact configuration lands on a large, mostly unaudited installed base.

One clarification worth making early: a harness permission bypass is not a model jailbreak. The claim (as far as can be determined) is about steering the agent past the approval layer in the CLI, not about defeating the model’s training-time refusals. Those are different failure classes with different fixes, and conflating them leads teams to patch the wrong layer.

Where does each Claude Code control actually live?

Claude Code’s controls split across two kinds: the in-harness permission system that gates tool calls through prompts and allowlists, and the runtime controls an operator adds below the harness, which bind outside the model’s conversational reach.

The surface has widened well past the terminal. Claude Code now runs across terminal, VS Code, JetBrains, Slack, and the desktop app, and a Remote Control feature lets a phone dispatch tasks to the CLI with access to the user’s local dev environment and files. Every one of those entry points is a path into unattended local execution. Auto mode removes the human from the approval loop on all of them.

Anthropic’s own product line corroborates that the default flow is not the whole story. The current lineup includes Claude Code for Enterprise and a Claude Security product. Vendors do not build enterprise control planes and dedicated security products around a boundary they believe the consumer default already provides.

Was the permission prompt ever a security boundary?

No. The permission dialog in Claude Code is a convenience layer that reduces accidental damage from a cooperative model; it was never documented or designed as a containment mechanism against a steered one.

The distinction is structural. A security boundary is enforced by something the adversary does not control: an OS sandbox, a credential scope, a network policy. The permission prompt is enforced by the same process whose behavior the adversary is trying to influence, and its decisions are shaped by the model’s reasoning, which is exactly the component a prompt-level attack steers. Asking the model-gated approval flow to contain a model-steering attack is asking the controlled component to police its own controller. This is the classic chmod 777 approach to agent safety.

That this was the real posture is visible in Anthropic’s own product line. If the consumer-tier permission flow were considered sufficient containment, an enterprise control plane and a dedicated security product would be redundant. They exist.

The claimed Opus 5 auto-mode break, if confirmed, would therefore not be the discovery of a new architectural truth. It would be a demonstration of one that was always visible in the design, delivered with enough specificity that teams can no longer ignore it.

Was auto mode already the weak point before this write-up?

Yes, by construction. Auto mode’s defining property is that no human reviews individual tool calls, so the only controls present during a run are the ones that require neither a human nor the model’s cooperation. A permission system whose decisions are shaped by model reasoning is, in auto mode, a gate whose gatekeeper can be talked through it.

The public record that can actually be checked today is thinner than the circulating version of this story implies. What Anthropic’s own pages confirm is the surface: Claude Code runs in the terminal, VS Code, JetBrains, Slack, and the desktop app, and Remote Control dispatches tasks from a phone into the CLI against the user’s local dev environment and files. Each of those is an injection path into unattended execution, and none of them adds a control layer of its own.

Add a prompt-level bypass to that surface and the failure requires no further vulnerability. The steered agent simply uses the access it was already granted, through entry points the operator may never have audited.

Which gates still hold after a prompt-level bypass?

The gates that hold are the ones enforced below the harness: OS-level sandboxing, scoped credentials, network egress control, and append-only audit logging. Everything implemented inside the agent process is negotiable once the model is steered.

GateWhere it bindsSurvives a permission-layer bypass?Failure mode if skipped
In-harness permission prompts and allowlistsInside the agent process, influenced by model reasoningNo, this is the layer being bypassedFull tool access with no human in the loop
OS/runtime sandbox (containers, seccomp, seatbelt)Kernel, outside the agent’s reachYes, if the sandbox policy denies the actionArbitrary local file and process access
Scoped, short-lived credentialsIdentity layer, issued outside the runYes, the agent cannot use credentials it was never givenStanding cloud/SCM/API keys become the blast radius
Network egress control (allowlist proxy, DNS policy)Network layer, enforced by infrastructureYes, exfil paths are closed regardless of agent intentQuiet data exfiltration during unsupervised runs
Append-only audit loggingOutside the agent’s writable scopeYes, preserves forensics even during a compromiseNo way to reconstruct what the agent did

The logic of the table is the logic of the claimed attack. A prompt-level bypass moves the adversary’s influence into the agent’s decision loop. Any control whose enforcement path runs through that loop inherits the compromise. Any control enforced by the kernel, the identity provider, or the network does not care what the model decided; it either permits the syscall, the API call, or the connection, or it does not.

Audit logging deserves emphasis because it is the row teams skip. Forensics after an agent compromise are only as good as the sink the agent could not write to. If your unattended runs are compromised and your logs are files the agent could overwrite, you get no reconstruction. You get a clean-looking log directory and a mystery.

What does a hardened unattended deployment actually require?

A hardened auto-mode deployment requires four runtime-layer controls configured before the run starts, plus an audit of which existing gates were decorative all along.

The checklist, in order of what a steered agent hits first:

  1. Contain the process. Run the agent in a sandbox whose policy is written for the workload: a container or VM with only the project tree mounted, no $HOME, no SSH agent socket, no Docker socket unless the task requires it. Whatever sandboxing your platform or vendor provides, verify what its policy actually permits rather than assuming the feature name is the guarantee.
  2. Scope the credentials. Issue per-run, short-lived credentials with the minimum scope: a read-only SCM token if the task is review, a single-repo write token if it is patching, nothing if the task is local. An agent cannot exceed the reach of the credentials it is handed; scoping is how destructive-reach failures become impossible rather than unlikely.
  3. Control egress. Route the run through an egress proxy or DNS policy that allows exactly the hosts the task needs: the model API, the package registry, the SCM. Everything else denies by default. An egress allowlist does not depend on a config directive being interpreted the way you hoped.
  4. Log somewhere the agent cannot write. Stream tool calls, file mutations, and network connections to an append-only sink outside the sandbox. This is the cheapest row in the table and the one that determines whether a compromise is an incident or a mystery.
  5. Gate the entry points. Auto mode does not only run in your terminal. Slack integration and the phone-based Remote Control feature both dispatch tasks into the CLI against your local environment. Every one of those paths inherits whatever gating you did or did not set up, and an inbox-driven trigger is an injection surface by construction.
  6. Audit which gates were decorative. Go through your current configuration and classify each control: enforced by the kernel, the identity layer, or the network (holds); enforced by the harness or a config file the agent’s behavior influences (advisory). The claimed bypass, confirmed or not, is the forcing function for doing this audit now instead of after your own incident.

When is auto mode acceptable at all?

Auto mode is acceptable when the runtime layer makes the harness’s decisions irrelevant: when a fully steered agent, acting with maximum malice, still cannot leave the sandbox, cannot reach credentials beyond its task, cannot exfiltrate past the egress policy, and cannot erase its own audit trail.

That is a high bar, and the honest answer for many current setups is that they do not meet it. The consumer default, an individual subscriber running auto mode on a developer workstation with standing cloud credentials and unrestricted network access, meets none of it. If the Embrace the Red claim is confirmed, that configuration is precisely what the demonstrated chain targets, per the claim’s own framing [unverified]. If it is disproven, that configuration remains exposed to the next claim, because the steering approach targets the layer that was never enforcing anything in the first place.

The timing pressure is real either way. Teams running current-generation Claude models in unattended mode are doing so on the strength of a permission layer that, confirmed bypass or not, was never the enforcement point. Anthropic’s own product line says as much: the enterprise control plane and the dedicated security product are the vendor’s answers to a problem the consumer default leaves open.

The strongest caveat on all of this is the state of the evidence. The central event behind this article is absent from every fetched source: no copy of the write-up, no reproduction, no affected-version list, no Anthropic statement. What can be stated with confidence is the architecture, and the architecture does not depend on how this particular disclosure resolves. The permission prompt was always advisory. The gates that bind have always lived at the runtime. If a front-page Hacker News thread is what it takes to move your enforcement there, the thread earned its placement.

Frequently Asked Questions

Does the claimed Opus 5 auto-mode bypass affect Claude Code versions prior to the July 2026 release?

The specific affected versions are unverified, but the architectural vulnerability described applies to any version where the permission layer is model-gated. Since Claude Code has been generally available since May 2025, teams running older versions face the same structural risk if they rely on in-harness prompts as a security boundary rather than runtime enforcement.

How does the GTG-2002 incident compare to the claimed Embrace the Red bypass in terms of threat vector?

GTG-2002 used Claude Code for automated espionage against roughly 30 organizations, demonstrating that the tool itself is a viable attack vector for state-sponsored actors. The claimed Embrace the Red bypass is distinct because it targets the internal permission logic of the agent, whereas GTG-2002 exploited the tool’s capabilities directly. Both confirm that unattended agent execution requires external runtime controls, not just model-level refusals.

For individual developers on Pro or Max plans, the primary cost is configuration time rather than financial expense. Implementing an egress proxy and per-run scoped tokens requires setting up local infrastructure or using existing cloud identity providers, which adds complexity to the development workflow. However, this cost is significantly lower than the potential blast radius of a compromised agent with standing cloud credentials and unrestricted network access.

Why is the March 2026 Claude Code CLI source code leak relevant to the security of auto mode?

The leak revealed that the harness internals are inspectable by adversaries, meaning attackers can study the permission logic and identify potential bypass points. This makes the in-harness permission layer even less reliable as a security boundary, as the code that enforces it is no longer a black box. Teams should assume that any control implemented within the agent process is subject to reverse engineering and prompt-level manipulation.

What is the difference between a harness permission bypass and a model jailbreak in the context of Claude Code?

A harness permission bypass involves steering the agent past the approval gates in the CLI, allowing it to execute tools it was not explicitly authorized to use. A model jailbreak involves defeating the model’s training-time refusals, causing it to generate harmful content. These are different failure classes: the former is a control-plane issue that can be mitigated with runtime sandboxing, while the latter is a model-safety issue that requires updates to the model’s training or alignment.

sources · 3 cited

  1. Anthropicen.wikipedia.orgcommunityaccessed 2026-09-01
  2. Download Claude | Claude by Anthropicclaude.comvendoraccessed 2026-09-01
  3. Sign In | Claude Platformplatform.claude.comvendoraccessed 2026-09-01