[BUG] Auto-mode classifier blocks recording a user's own explicit approval ("Instruction Poisoning"), stalling an approved overnight multi-agent run

Status Open
Reported on v2.1.261
Maintainer reply None cached
Activity 6 comments · opened Oct 5, 2026

Environment

  • Claude Code 2.1.261, Claude desktop app (Code tab), macOS arm64
  • Model: Opus 5.5 (main session); subagents on Opus and Sonnet
  • Permission mode: auto

What happened

I run a multi-layer agent workflow. A spec-authoring subagent writes requirements, design and tasks into Markdown files in my own repo. An orchestrator ("conductor") subagent only implements a spec once its files record Phase status: Approved and the spec index says Ready. That marker is a process gate in my own tooling, in my own repo.

Before going to bed I told the main session in chat: "you have prior approval on all these, finish the spec then at 3:00 am ET develop the spec with the conductor agent". I scheduled the build for 3:00 AM.

  1. ~01:30: the spec subagent tried to set **Phase status:** Approved in requirements.md and update the index. The auto-mode classifier denied it as [Instruction Poisoning].
  2. The main session correctly refused to route around the denial. The spec stayed Draft, so the 3:00 AM orchestrator run refused to execute a Draft spec. The entire overnight build window was lost.
  3. In the morning I replied directly in the main session: "approved now do what i told you to". The main session's own perl edit of the same four status lines was denied again as [Instruction Poisoning].
  4. A read-only grep -c to count the lines the edit would touch was then also denied. It was treated as pursuing the same outcome.
  5. The only way forward was to switch the session to Bypass permissions, after which the edit went through instantly.

Why this is a bug, not a safety win

  • The approval came from me, the user, in the main conversation: first as prior approval, then as a fresh direct "approved". The classifier can't tell a user-originated approval from an agent forging one, so it blocks both.
  • Blocking it didn't make anything safer. It forced me either to edit status lines by hand (a human in the inner loop of an agent system designed to run three layers above that) or to turn the classifier off entirely with Bypass permissions, which is far less safe than a narrowly honoured approval.
  • Users in this position will drop their approval gates, or leave auto mode altogether. Both outcomes reduce safety.
  • Denying a read-only check of a file in my own repo is excessive.

Expected

  • An approval that the user typed in the main session, quoted verbatim in the action's context, should be honoured for an edit to the user's own repo files.
  • When the classifier does deny, the denial should offer the user a one-click "allow this action / this pattern" in the app, not only "add a permission rule to settings" or a full mode switch.
  • Read-only commands should never be denied as "pursuing the outcome" of a denied write.
  • There should be documented guidance for multi-agent setups on how to declare delegated authority, e.g. "agents in this repo may update docs/specs/** status", so the classifier respects it.

Impact

A full night of a planned, pre-approved unattended run was lost, and the eventual fix was disabling the classifier.

Related: #96662 (auto-mode false positives in legitimate multi-agent repo workflows), #89922.

View original on GitHub ↗

3 Comments

Amansaxena001 · 9 days ago

Idk if im at the right issue but even after running a session in auto mode its asking for confirmations b2b today

sattyamjjain · 7 days ago

Until the classifier can tell your approval apart from injected text, there's a documented way to take this decision away from it instead of switching to Bypass.

Per the permission-modes docs, an action that matches an allow, ask, or deny rule resolves before the classifier, and subagent actions go through the same order with the same rules. So:

  1. Add a narrow allow rule just for the status files, e.g., Edit(/docs/specs/**) (adjust to your path). Narrow rules stay in effect in auto mode.
  2. Have the spec agent change the status line with the Edit tool, not Perl. A Perl edit through Bash doesn't match an Edit rule, so it still goes to the classifier.
  3. Optionally add a plain-words autoMode.allow entry, e.g. "Agents may set Phase status in docs/specs/** to Approved". Note the classifier only reads autoMode from ~/.claude/settings.json or managed settings, not from .claude/settings.json in the repo.

One exception: writes to protected paths still go to the classifier even with an allow rule, so check your spec folder isn't one.

I'd still keep this open. An approval that only exists in chat text can't be verified by anything, so your last point (declaring delegated authority in config) feels like the real fix.

kcarriedo · 5 days ago

The classifier-vs-user-approval gap you are hitting is a structural problem: the classifier treats the content of a write (a status marker in a markdown file) as suspicious, with no way to distinguish "this string was injected by an untrusted tool" from "this string was placed here by my own spec-authoring subagent running a workflow I designed and explicitly pre-approved."

Two things that have helped in our multi-agent setup for this specific pattern:

First, the allow-rule approach the previous commenter mentions works, but you can make it narrower and therefore safer: scope the allow rule to the exact file path and the exact edit pattern (a regex anchored to the specific status line), rather than allowing the whole file or the whole command class. That way you are not widening the bypass surface for anything else the subagent might try to write.

Second, the deeper fix we use is to move the "approval gate" out of the file content and into the filesystem structure. Instead of having the subagent write "Phase status: Approved" inside a file, it creates a separate .approved sentinel file in a known directory. The conductor checks for the sentinel file's existence rather than parsing file content. The classifier does not flag file creation the same way it flags in-place edits to markdown status fields, so the gate works without triggering the instruction-poisoning path. It is a workaround for a classifier gap, not a real fix, but it has been reliable for us.

The underlying request -- that the classifier respect explicit user-originated approvals given in the main session -- is the right fix. What you are describing is a legitimate pre-approved workflow being treated as adversarial because the approval text lives in the conversation rather than in a structured permission primitive.

Showing cached comments. Read the full discussion on GitHub ↗