Problem
thinktank run --attempts 10 creates 10 full copies of the repository as git worktrees. For a 1 GB repo, this consumes 10 GB of disk space with no warning. The user discovers the problem only when the disk fills up and git starts failing with cryptic errors.
There is currently no disk space check before worktrees are created.
Steps to Reproduce
- Have a large repo (e.g., 500 MB+)
- Run
thinktank run "fix this bug" --attempts 8
- Disk fills up mid-run; worktrees fail to create; error messages are from git, not thinktank
Proposed Solution
Before creating worktrees, check available disk space:
- Measure the size of the current repo directory
- Estimate required space:
repo_size × N × 1.1 (10% buffer)
- Check available space on the filesystem
- If insufficient, abort with a clear message:
✗ Insufficient disk space for 5 worktrees
Repo size: 1.2 GB
Required: 6.6 GB (5 × 1.2 GB + 10% buffer)
Available: 3.1 GB
Try reducing --attempts (current: 5) or freeing up disk space.
Use --no-space-check to skip this check.
Acceptance Criteria
Problem
thinktank run --attempts 10creates 10 full copies of the repository as git worktrees. For a 1 GB repo, this consumes 10 GB of disk space with no warning. The user discovers the problem only when the disk fills up and git starts failing with cryptic errors.There is currently no disk space check before worktrees are created.
Steps to Reproduce
thinktank run "fix this bug" --attempts 8Proposed Solution
Before creating worktrees, check available disk space:
repo_size × N × 1.1(10% buffer)Acceptance Criteria
duor equivalent)--attemptsor freeing disk space--no-space-checkflag skips the check for users who know what they're doing