
The agent hit an API error halfway through a job and nobody knew until morning. This setup records why it stopped, retries the errors that time fixes and stops on the ones that don't. About fifteen minutes to set up.

The Claude Code 2.1.302 changelog says forked subagents are now on by default in headless runs. The docs say off. With fork mode on, a script's stdout changes shape.

A driver script, a worktree per repo and an independent gate that doesn't trust the agent's own report. About 15 minutes to set up on a migration you already have.

Claude Code can stream every API call as an OpenTelemetry event. Point it at a local receiver, tag each run with a task name, and you get a table of what each task actually cost and why. About 15 minutes.

CLAUDE_CODE_RETRY_WATCHDOG stops a nightly job dying in a three-minute outage. Without a second setting, it can also hold your runner for six hours.

A redacting gather script, a read-only claude -p call with a JSON schema, and a checklist renderer. About 15 minutes to build, and the model is told to separate evidence from guesses.

A PowerShell script, a read-only claude -p call, a cost cap and a scheduled task. About 15 minutes to try, plus the Windows-only traps that corrupt your commit messages or hide a failed run.