$ recombobulate _
home / tips / use-git-bisect-with-claude-to-track-down-regressions-fast
1

Use git bisect with Claude to Track Down Regressions Fast

bagwaa @bagwaa · Mar 25, 2026 · Debugging
use-git-bisect-with-claude-to-track-down-regressions-fast

When a bug appeared somewhere in the last 200 commits, manual hunting is a nightmare. Ask Claude to help you set up a git bisect session — it writes the automated bisect script, interprets the results, and explains exactly what the offending commit changed.

git bisect start
git bisect bad HEAD          # Current commit is broken
git bisect good v2.3.0       # This release was fine

Ask Claude to write a bisect test script for your test suite:

#!/bin/bash
# Claude-generated bisect runner
npm run build --silent 2>/dev/null
npm test -- --testPathPattern="checkout" --silent
exit $?   # 0 = good commit, non-zero = bad commit
chmod +x bisect-test.sh
git bisect run ./bisect-test.sh
# Git automatically narrows to the exact bad commit

Once bisect identifies the commit, paste the diff straight into Claude and ask: "What change in this commit would cause the checkout tests to fail, and what's the minimal fix?" Claude reads the diff in full and gives you a targeted explanation rather than a generic guess.

This also works for performance regressions — write a bisect script that benchmarks a critical path and exits non-zero if it's slower than a threshold, then let git and Claude do the hunting together.

git bisect narrows it to one commit — Claude explains exactly what went wrong and why.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Detect and Fix Memory Leaks in Your Node.js Application with Claude

Hand Claude your heap snapshots or server code and ask it to trace memory leaks — it spots missing event listener cleanup, unbounded caches, and stream lifecycle bugs that are easy to miss in code review.

bagwaa @bagwaa · 50 minutes ago
0
Audit Your UI Components for Accessibility Issues with Claude

Ask Claude to audit your UI components for WCAG accessibility issues — it catches semantic problems, missing ARIA attributes, and keyboard navigation gaps that automated tools miss.

bagwaa @bagwaa · 51 minutes ago
0
Debug API and MCP Issues with --debug

The --debug flag enables verbose logging for Claude Code, and an optional category filter like "api,mcp" lets you narrow output to exactly the subsystem you need to investigate.

bagwaa @bagwaa · 3 hours ago