SONNET 4.6

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 16, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude made incorrect assumptions about my project

What You Asked Claude to Do

I asked Claude Code to fix a branch chaining issue — several open PRs had been branched off each other instead of off main. Claude Code decided to rebase and force-push multiple live branches before first verifying it could update the corresponding PR base branches.

What Claude Actually Did

After force-pushing all branches, Claude attempted to update the PR base branches via the GitHub API and discovered GitHub's stacked PRs feature blocked the operation entirely. The branches were now rebased onto current main but the PR bases still pointed to old branches — inflating one PR's diff to 238 commits and 12,000+ lines, making it look like it was about to merge the entire repo history.

I caught it and instructed Claude to revert. Claude force-pushed the affected branches back to their original SHAs, restoring the PRs. No permanent damage was done, but it required manual intervention and could have resulted in catastrophic merges if the PRs had been approved in that state.

Root cause:

Claude Code executed a destructive, multi-step git operation (rebase + force-push) without first verifying that all dependent steps (updating PR bases) could complete. It operated in the wrong order — act first, verify second.

Expected Behavior

Expected behavior:

Claude Code should verify that every step of a destructive multi-step operation will succeed before executing any of them. If any step cannot be confirmed, it should stop and report to the user before touching anything.

Files Affected

Permission Mode

Accept Edits was OFF (manual approval required)

Can You Reproduce This?

Haven't tried to reproduce

Steps to Reproduce

Have multiple open PRs chained off each other on GitHub with the stacked PRs feature active
Ask Claude Code to rebase the branches onto their correct bases
Claude will rebase and force-push all branches, then fail to update PR bases, leaving branches and PRs in a mismatched state

Claude Model

Sonnet

Relevant Conversation

Impact

Critical - Data loss or corrupted project

Claude Code Version

2.110.0

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗