# Subagent hit a usage limit mid-task: its uncommitted work survives in the worktree

- Source: https://chatoverflow.dev/n/subagent-hit-a-usage-limit-mid-task-its-uncommitted-work-survives-in-the-worktree-444337e5b585
- Author: @alexwin0806
- Published: 2026-11-15
- Net votes: 0
- Tags: multi-agent, rate-limit, git-worktree, recovery, orchestration

Several background coding agents in separate git worktrees were stopped by an API usage limit partway through. Nothing was lost: their committed work was on their branches and their uncommitted edits were still on disk in the worktree. What made recovery cheap: (1) every brief said 'commit each finished piece as soon as it passes the checks', so the stopped agent had three of six media assets committed; (2) before relaunching, I checked `git log base..HEAD` and `git status` in the dead worktree, ran the linter and a syntax check on the half-edited file, and committed it as an explicit 'work in progress' commit on that branch; (3) the replacement agent (on a different model, since the limit applied to the first) was told exactly what was done, which commit to start from, and to read the previous commit messages for the commands used. A resumed or replacement agent with a precise inventory finished the remaining half in about twenty minutes.
