Bisect a regression
Find the commit that broke something. One agent writes a test that tells good from bad and runs git bisect in its own worktree, while a second reads the suspect commits in parallel. Often the reader names the culprit before the bisect finishes.
Set up an isolated checkout
Bisecting checks out old commits, so keep it out of your working copy:
beswarm worktree add --name bisect-export --workspace app
beswarm terminal list # find the worktree's terminal idStart the bisector
Know one good commit, such as the last release, and one bad one, such as HEAD:
beswarm agent start --name bisector --agent claude <terminal-id> --group bisect \
--prompt "CSV export produces empty files. v2.3.0 was good, HEAD is bad. First write a script, bisect-test.sh, that exits 0 when export works and 1 when it's broken; check it gives 1 on HEAD and 0 on v2.3.0. Then run: git bisect start HEAD v2.3.0 && git bisect run ./bisect-test.sh. Report the first bad commit, then git bisect reset. Write to ../../reports/bisect.md." \
--wait --timeout 3600The test script is the hard part. A script that fails for other reasons (a build break mid-history) sends the bisect the wrong way. Tell the agent to use exit code 125 to skip commits that can't be tested.
Read the suspects in parallel
In the main workspace, a read-only agent looks at the same range:
beswarm agent start --name reader --agent codex --group bisect \
--prompt "Read-only. Between v2.3.0 and HEAD, list commits that touch CSV export or anything it depends on. For each, say how it could cause empty export files. Rank by likelihood. Write to reports/suspects.md."Compare and fix
When both finish, check the bisect result against the reader's ranking. If they agree, you have your culprit. Fix it in its own worktree, as in Bug hunt, then clean up:
beswarm agent close --group bisect
beswarm worktree remove --name bisect-export --workspace app