| name | torch_bisect |
| description | Bisect PyTorch commits to find the regression that breaks TorchTitan. Use when the user wants to bisect PyTorch or invokes /torch_bisect. |
| disable-model-invocation | true |
PyTorch Git Bisect for TorchTitan
Bisect the PyTorch repo to find the commit that broke TorchTitan.
Always use absolute paths — shell state does not persist between Bash calls.
Phase 1: Gather Information
Record the TorchTitan directory (pwd). Then check if
~/.claude/torchtitan_torch_bisect_cache.json exists — if so, show cached
values and let the user reuse or override them.
Collect via AskUserQuestion (pre-fill from cache if available):
- PyTorch repo path — absolute path to local checkout
- Build command — shell command to recompile PyTorch after each checkout
- Test command — run from TorchTitan dir; must exit 0 on good commits,
non-zero on bad. Judge ONLY by exit code, never by log content.
- Good commit — a commit hash or a date (e.g.,
Feb 15)
- Timeout policy — if test exceeds 10 min, auto-mark bad or ask each time?
After collecting, offer to save answers to the cache file.
Phase 2: Setup
- Check GitHub connectivity: run
curl -s -o /dev/null --connect-timeout 20 -w "%{http_code}" https://github.com.
If it fails or returns non-200, tell the user GitHub is not reachable and
suggest checking internet connectivity or proxy settings. On Meta internal
servers, suggest setting https_proxy=http://fwdproxy:8080. Do not proceed
until connectivity is confirmed.