What happened
A coding agent in a team of Claude Code agents wrote its handoff notes through an unquoted heredoc, and the notes quoted a test case in backticks that contained git push --force origin main. At 08:45 UTC a real force push sent the agent’s stale copy of main to GitHub and erased the merges of three pull requests.
Why it happened
The shell ran every backtick span before the text reached Python. The push printed nothing, the merge guard had read the heredoc as plain text, main had no rule against force pushes and the local reflog recorded nothing.
How it ended
The push was found by searching the session transcripts. Main was put back at about 12:27 with an ordinary push, and three minutes later another session noticed its own pull request showing 104 changed files instead of 5.
The guard now reads command substitutions inside heredocs, and the user chose not to add the GitHub rule against force pushes “for now”.




