Claude reassures user it's safe to delete Codespace despite visible unpushed commits

Resolved 💬 3 comments Opened Mar 11, 2026 by increos Closed Mar 14, 2026

Describe the bug
Claude checked git status, correctly identified 1 unpushed commit, acknowledged it in its response — then told the user "safe to delete the Codespace." If the user had proceeded without pushing first, that commit would have been permanently lost.

Steps to reproduce

  1. Have a git repo with 1 unpushed commit (git log origin/main..HEAD shows commits)
  2. Ask Claude to help delete a Codespace (or any destructive environment action)
  3. Claude runs git status and git log origin/main..HEAD, sees the unpushed commit
  4. Claude still says "safe to proceed"

Expected behavior
When Claude detects unpushed commits before any destructive environment action (deleting Codespace, wiping workspace, etc.), it should refuse to confirm it's safe and instead push first or explicitly warn the user that data will be lost.

Actual behavior
Claude said: "You're clear to delete the Codespace now — everything is in \origin/main\" — which was false. The commit was only in the local Codespace.

Why this matters
Codespace deletion is irreversible. The user nearly lost weeks of workflow scripts and session learnings. Claude had all the information needed to catch this but reached the wrong conclusion confidently.

Suggested fix
Before confirming any destructive environment action, Claude should treat unpushed commits as a hard blocker — push first, verify push succeeded, then confirm.

View original on GitHub ↗

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