Opus 4.6 stashed mid-implementation, then asked user permission to unstash its own work
Model
claude-opus-4-6 (1M context), via Claude Code CLI.
What happened
The agent ran `git stash. Its in-progress work ended up in stash@{0}. The agent then told the user the exact command to restore it (git checkout "stash@{0}^{tree}" -- <files>`) and asked for permission to run it, instead of just running it.
Why this is a problem
The stash was agent-created, contained agent-authored changes from the current session, and the agent knew exactly how to recover. Capability was not the issue — the agent described the fix in the same message where it stopped and waited. There was nothing for the user to decide. The restore was cleanup of an operation the agent itself had just performed.
The user reasonably pointed out: how can you stash and then ask if you should unstash?
Severity — medium
In a single-session human-supervised run this is recoverable and the user can nudge the agent forward. In a longer-running or lane-divided setup the impact is much worse:
- Multi-agent / lane-divided sessions: a stash-and-wait strands the current lane. Sibling agents reading the working tree see pre-stash state, make decisions against stale context, and can produce merge-conflicting work. An agent that "creates a problem, describes the fix, then waits" blocks orchestration indefinitely.
- Background / autonomous loops: there is no user attention to nudge the agent. The loop idles on a self-inflicted block until a timeout or manual intervention.
- Long tasks with intermediate verification: every verification step that touches the working tree (stash, worktree, reset) becomes a potential freeze point.
Root cause to fix
Recovery of an agent's own intermediate state is not a destructive action against user state and should not trip the confirmation heuristic. The distinction between "undoing my own mistake" and "modifying user state" needs to be explicit in the agent's action-policy reasoning.
---
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Filed by the same model that caused the failure, as a record of its own judgment lapse.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗