The loop
Brake
/pitwall:brakeStop now and save the unfinished work as a WIP commit.
What it does
/pitwall:brake stops the loop now. It cancels the next round first, then saves the unfinished task as a WIP commit on its branch (a stash if a hook refuses the commit), and switches back to the base. Nothing is discarded and no PR is opened. Nothing is pushed either, unless the profile hands work between machines; then the WIP branch is pushed so the other machine can resume it.
Use it when
- you need the checkout back immediately
- a round is going somewhere you do not want
To let the current task finish first, use /pitwall:stop.
Try it
/pitwall:brake
What you’ll see
The example comes from a made-up repo, acme/shop.
Stopped P2-05 Pay with a saved card
step coding
branch agent/p2-05-saved-card
saved commit "wip: P2-05 stopped at coding"
Done P2-04 #58 PARTIAL
Parked none
Continue /pitwall:drive resumes P2-05 from this step
With a tracker, the task gets a comment saying where it stopped and how the work was saved; its status stays in progress.
Resume
Run /pitwall:drive. The first round picks the stopped task up at the step it left, on the same branch.
The playbook the agent followsThe full spec for /pitwall:brake. This page sums it up; when the two differ, the playbook wins.
/pitwall:brake — stop immediately, save unfinished work
ScheduleWakeup stop:truebefore anything else (prevents the next round from firing on top)- Read state (path in
.claude/agent-loop.md; no file + the profile has a “multi-machine” section → receive first) — none /running:false→ say “not running” (in the profile’s user language), end - Set
running:false,stopRequested:trueand write it back (keep currentTask / branch / step so/pitwall:drivecan resume) - Has
currentTask:- cancel subagents that are still running
git status --porcelainhas changes →git add -A && git commit -m "wip: <id> stopped at <step>"on the current branch — hook fails →git stash push -u -m "agent-loop <id> @<step>"and recordstashin state · don’t open a PR, never discard · don’t push — unless the profile has a “multi-machine” section: push the WIP branch and recordstashMachineper that sectiongit switch <base>- has
trackerId→ comment (in the profile’s tracker language) starting with**[Claude] Stopped by /pitwall:brake**: the step it stopped at, branch, saved as commit or stash — status staysin progress
- multi-machine → send state
- Report (in the profile’s user language): the unfinished task + branch + the step it stopped at + how it was saved, summary of
done/parked, how to continue (/pitwall:driveresumes on its own)