3days since the last Git and AI fuck-up

Incidents 26 Oct force-pushClaude Code

The notes that force-pushed main

Status: wrote down a force push. The shell ran it.

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”.

From the cut

From the cut: The notes that force-pushed mainFrom the cut: It's only a quote:
git push --forceFrom the cut: Force-pushed.From the cut: The notes that force-pushed main
The day before 23 OctThe key that was deleted three hours laterStatus: deleted in May. Still there in October.Watch it

The day after: The lease that always passed →