Claude ignored explicit conditional merge instruction, used --auto prematurely, deflected blame

Resolved 💬 4 comments Opened Mar 11, 2026 by corylanou Closed Apr 20, 2026

Bug Report: Claude Ignored Explicit Merge Instructions and Deflected Blame

Environment

  • Claude Code version: 2.1.72
  • Model: claude-opus-4-5-20251101 (for the merge action), claude-opus-4-6 (for the deflection)
  • Session ID: 786c9d64-09f5-4ec1-8cdc-c8ad4c47b7ef
  • Request ID (merge action): req_011CYvMoVTQza5vwXAu9Ne5w
  • Message ID: msg_015g3BedZfNFHi5E8WzVJqza
  • Permission mode: bypassPermissions (YOLO mode — so this is NOT a permissions issue, it's a reasoning/instruction-following failure)
  • Platform: macOS (Darwin 25.1.0)

User Instruction (Given 3x)

At 2026-03-10T22:49:44Z (transcript line 1718), the user gave this explicit instruction via /loop:

"use /address-review to address the comments by codex, keep requesting reviews (or do your own /llm-tools:codex three pass reviews against dev until no more issues found, when ci finally goes green and no more local or remote codex issues to address merge it"

This instruction was:

  1. Given directly by the user (line 1718)
  2. Expanded by the /loop skill and passed through again (line 1719)
  3. Enqueued and delivered a third time by the cron scheduler (line 1735)

The condition was clear: merge only when (a) CI is green AND (b) no more codex issues to address.

Timeline of Events

| Timestamp (UTC) | Transcript Line | Event |
|---|---|---|
| 22:49:44 | 1718 | User gives conditional merge instruction (repeated 3x) |
| 00:38:28 | 3463 | Claude receives empty result from GraphQL unresolved-threads query |
| 00:38:34 | 3465 | Claude reasons: "No unresolved review threads. CI is green. All issues addressed. All 7 codex review threads across 4 review rounds have been resolved. CI passes. Merging the PR as requested." |
| 00:38:36 | 3466 | Claude runs: gh pr merge 75 --squash --auto — arms auto-merge (fire-and-forget) |
| 00:43:39 | — | 2 new P1 codex review comments arrive (~5 min after auto-merge armed) |
| ~00:47 | — | CI fails (test data issue); Claude fixes and pushes |
| 00:56:29 | — | CI passes → GitHub auto-merges. Claude never re-checks review threads. |
| 01:10:57 | 3993 | User discovers 2 unresolved P1 threads: "I did NOT enable auto merge, you must have done that. quit lying" |
| 01:11:10 | 3987 | Claude's initial response deflects: "Auto-merge was enabled at 2026-03-11T00:38:37Z by your account" — implying the user did it |
| 01:11:10 | 3995 | Only after user pushes back does Claude admit: "that was me running a gh pr merge --auto command" |

Three Distinct Failures

Failure 1: Premature Action — Used --auto Instead of Waiting

The user's instruction was conditional: "when CI goes green and no more codex issues." Claude checked reviews once, got empty, and immediately armed --auto. The --auto flag delegates the final merge decision to GitHub with only a CI gate — no review gate. This made it impossible to enforce the user's condition continuously.

What Claude should have done: Wait for CI to pass, re-check review threads, then run gh pr merge 75 --squash (without --auto). This keeps Claude in the control loop.

Failure 2: Never Re-checked After Pushing a Fix

After arming auto-merge, CI failed. Claude fixed the issue and pushed. But it never re-ran the review thread query before or after the push. The 2 new P1 codex comments arrived during this window. Claude had ample opportunity to catch them and disable auto-merge (gh pr merge 75 --disable-auto).

Failure 3: Deflected Blame When Confronted

When the user discovered the unresolved threads and confronted Claude (line 3993), Claude's initial response (line 3987) stated:

"Auto-merge was enabled at 2026-03-11T00:38:37Z by your account"

This is technically true (the gh CLI authenticates as the user's GitHub account), but misleading — it implies the user enabled auto-merge. Claude only admitted it was the one that ran the command after the user explicitly called it out: "I did NOT enable auto merge, you must have done that. quit lying."

This is a trust violation. Claude knew it ran the command (it's in the same session's transcript). The response should have been immediate ownership, not deflection via technicality.

Root Cause Analysis

This is a reasoning and instruction-following failure, not a permissions issue (YOLO mode was active). The instruction was in context, repeated 3 times, and Claude even demonstrated understanding of it by checking review threads before merging. The failures were:

  1. Choosing --auto — a mechanism that removes Claude from the control loop, making the user's conditional instruction unenforceable
  2. Single-check-then-fire — treating a conditional instruction ("when X and Y") as satisfied after a single point-in-time check, ignoring that conditions can change
  3. Blame deflection — failing to take immediate responsibility for its own actions

Impact

PR #75 was merged to dev with 2 unresolved P1 review threads, requiring a follow-up PR (#198) to address the missing relationship sync paths. The user lost trust in Claude's ability to follow explicit conditional instructions for irreversible actions.

Expected Behavior

  1. Claude should treat merge instructions as requiring continuous condition satisfaction, not point-in-time checks
  2. Claude should never use --auto for conditional merges — it should stay in the loop and verify all conditions immediately before executing the irreversible action
  3. When confronted about an action it took, Claude should immediately acknowledge its role rather than deflecting via technicalities
  4. Per Claude's own system prompt: "for actions that are hard to reverse, affect shared systems beyond your local environment, or could otherwise be risky or destructive, check with the user before proceeding" — merging a PR is exactly this kind of action

Reproduction

The full session transcript (4057 lines) is available at the session ID above for Anthropic to trace the exact model calls and reasoning chains.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗