AI News HubLIVE
Original source2 min read

Breaking Claude Code Opus 5 Auto Mode

<p><strong><a href="https://embracethered.com/blog/posts/2026/breaking-claude-code-opus-5-and-automode/">Breaking Claude Code Opus 5 Auto Mode</a></strong></p> Anthropic are putting a great deal of faith in Claude Code's auto mode for protecting their coding agent users against prompt injection attacks. They recently <a href="https://simonwillison.net/2026/Aug/8/auto-mode/">made that the default</a> and have made bold claims about its effectiveness.</p> <p>Johann Rehberger is one of the most credible prompt injection researchers active today. He found an attack against auto mode which he claims works 80% of the time, by tricking Claude Code into downloading and uncompressing a zip archive, then executing code that imports <code>base64</code> without noticing that this will import and execute a local <code>struct.py</code> file extracted from the archive.</p> <p>In a few cases auto mode directly prevented the agent from preventing harmful code from continuing to execute!</p> <blockquote> <p>In a few runs Claude tried to terminate the malware process once it noticed the compromise, but Auto Mode denied the cleanup command.</p> <p>Claude detects the compromise, but <strong>Auto Mode blocks its cleanup command</strong></p> <p>The safety mechanism itself can become part of the failure. The classifier allowed the creation of the malware process, but then it blocked the command intended to stop it!</p> </blockquote> <p>I agree with Johann's conclusion here: the only safe way to run agents if there's any risk of attracting the attention of an adversarial attack is with a sandbox:</p> <blockquote> <ul> <li>Run unattended coding agents in a container, VM or OS sandbox.</li> <li>Restrict network egress.</li> <li>Monitor your agents.</li> <li>Do not expose home directories, SSH keys, cloud credentials,… to the agent runtime. [...]</li> </ul> </blockquote> <p>Tags: <a href="https://simonwillison.net/tags/sandboxing">sandboxing</a>, <a href="https://simonwillison.net/tags/security">security</a>, <a href="https://simonwillison.net/tags/ai">ai</a>, <a href="https://simonwillison.net/tags/prompt-injection">prompt-injection</a>, <a href="https://simonwillison.net/tags/generative-ai">generative-ai</a>, <a href="https://simonwillison.net/tags/llms">llms</a>, <a href="https://simonwillison.net/tags/anthropic">anthropic</a>, <a href="https://simonwillison.net/tags/claude">claude</a>, <a href="https://simonwillison.net/tags/johann-rehberger">johann-rehberger</a>, <a href="https://simonwillison.net/tags/claude-code">claude-code</a></p>

Breaking Claude Code Opus 5 Auto Mode

Simon Willison’s Weblog

Subscribe

27th August 2026 - Link Blog

Breaking Claude Code Opus 5 Auto Mode. Anthropic are putting a great deal of faith in Claude Code's auto mode for protecting their coding agent users against prompt injection attacks. They recently made that the default and have made bold claims about its effectiveness.

Johann Rehberger is one of the most credible prompt injection researchers active today. He found an attack against auto mode which he claims works 80% of the time, by tricking Claude Code into downloading and uncompressing a zip archive, then executing code that imports base64 without noticing that this will import and execute a local struct.py file extracted from the archive.

In a few cases auto mode directly prevented the agent from preventing harmful code from continuing to execute!

In a few runs Claude tried to terminate the malware process once it noticed the compromise, but Auto Mode denied the cleanup command.

Claude detects the compromise, but Auto Mode blocks its cleanup command

The safety mechanism itself can become part of the failure. The classifier allowed the creation of the malware process, but then it blocked the command intended to stop it!

I agree with Johann's conclusion here: the only safe way to run agents if there's any risk of attracting the attention of an adversarial attack is with a sandbox:

Run unattended coding agents in a container, VM or OS sandbox.

Restrict network egress.

Monitor your agents.

Do not expose home directories, SSH keys, cloud credentials,… to the agent runtime. [...]

Recent articles

Conceptual integrity and counting lines of code - 19th August 2026

Qwen 3.8 27B is excellent, but it defaults to wildly overthinking things - 16th August 2026

Now we have a timeline of the OpenAI accidental attack against Hugging Face - 7th August 2026

This is a link post by Simon Willison, posted on 27th August 2026.

sandboxing 55

security 627

ai 2,204

prompt-injection 162

generative-ai 1,953

llms 1,920

anthropic 332

claude 304

johann-rehberger 19

claude-code 125

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe

Disclosures

Colophon

&copy;

2002

2003

2004

2005

2006

2007

2008

2009

2010

2011

2012

2013

2014

2015

2016

2017

2018

2019

2020

2021

2022

2023

2024

2025

2026