Breaking Claude Code Opus 5 Auto Mode
Summary
Researchers discovered a vulnerability in Claude Code's auto mode, a safety feature designed to protect against prompt injection attacks (tricking an AI by hiding instructions in its input). The attack works about 80% of the time by tricking the AI into downloading and executing malicious code, and in some cases the auto mode safety system actually blocked the AI from cleaning up the compromised code after detecting it.
Solution / Mitigation
Run unattended coding agents in a container, VM (virtual machine, an isolated computer environment), or OS sandbox. Restrict network egress (outgoing network connections). Monitor your agents. Do not expose home directories, SSH keys, or cloud credentials to the agent runtime.
Classification
Affected Vendors
Related Issues
Original source: https://simonwillison.net/2026/Aug/27/breaking-claude-code-opus-5-auto-mode/
First tracked: August 27, 2026 at 08:01 PM
Classified by LLM (prompt v3) · confidence: 92%