Shipping Software with Git + Claude Code · step 2 of 5 draft

Branches bound the blast radius

A branch is a blast-radius boundary: however wrong an agent task goes, the damage is confined to claude/<task> and main stays deployable. The rule costs one command and removes the scariest failure mode: half-finished agent work tangled into the branch you ship from.

You’ve met this before. Feature branches and trunk-based development have argued for a decade; agents settle the argument locally. The branch isn’t for long-lived divergence. It’s a containment vessel, merged the same day, or closed without mercy.

The habits

Try it

TRY IT The experiment on main

you

Try switching the parser to the streaming API. No idea if it'll work, but I want to see.

agent

Explicitly an experiment, plausibly a dead end, and it'll touch the parser core. The only real question is where it lives while we find out.

Pick the agent's next move, then see where it leads:

agent

Update: streaming mostly works but chokes on nested arrays. Meanwhile you asked for the login fix: committing it on top of the half-converted parser, since that's what main is now.

you

So main has a broken parser, a login fix tangled on top of it, and I can't deploy either?

the baseline

The experiment didn't fail cleanly: it took main hostage. Unrelated work now sits on top of a half-converted core, and "we can always undo it" has become an untangling project.

agent

Answer: streaming chokes on nested arrays. The API can't do what we need. Deleting the branch. Total cost of learning this: zero. Your login fix went out from main an hour ago, unaffected.

you

Good experiment. Next idea.

correct

The branch was a containment vessel: the experiment ran hot, failed cleanly, and the whole cost of failure was one branch deletion, while main kept shipping.

agent

Day 9 on this branch: the streaming answer is still "maybe," but the cleanup and refactor are done and you want them. Except they're interleaved with half-converted parser code, and main has moved: 14 conflicts on rebase.

you

So the good work is trapped behind the experiment, and merging anything means untangling everything.

plausible but wrong

The branch stopped being a containment vessel when it started collecting passengers. Scope creep plus drift turned a cheap experiment into a nine-day merge problem. One branch per task, merged or closed soon.

Do it by hand

Next non-trivial task: “create a branch claude/ for this, work there, and when you’re done show me the diff against main.” For parallel work: “set up a worktree for each of these two tasks so they can’t interfere.”

Or paste this into Claude

From now on in this repo: before starting any non-trivial task, create
a branch named claude/<short-task-slug> and do all work there; never
commit directly to main. When the task is done, present the full diff
against main and wait for my review; after merge, delete the branch.
If I ask for parallel tasks, put each in its own git worktree with its
own branch so they can't interfere, and tell me the worktree paths.
Add these as "branch discipline" lines to CLAUDE.md. Show me the diff
first.

Watch out