Claude Operator: Prompt to Autonomy · 16 min · 120 XP
Bounding turns, time, and spend
Give every unattended run a ceiling it cannot talk its way past.
An unattended run needs a ceiling, because the failure mode is not a crash — it's a loop that keeps trying. Searching for a file that doesn't exist, retrying a call that will never succeed, refining an answer nobody will read.
claude -p "$GOAL" \ --max-turns 10 \ --max-budget-usd 2.00 \ --output-format json
--max-turns caps agentic turns; --max-budget-usd caps spend in print mode and includes what subagents spend, which matters because a fan-out multiplies cost in a way that's easy to under-estimate. Set both: they fail differently, a cheap infinite loop hits the turn cap and an expensive short run hits the budget.
Decide a per-run and a per-day budget, and decide what happens as you approach each. A run that stops at the limit and reports honestly what it didn't finish is behaving correctly — the thing to design against is a run that quietly reports success having done a third of the work. Incomplete and honest is recoverable; complete-looking and partial is not.
Practice. Set explicit turn and time limits on a non-interactive practice run and confirm it stops within both and reports incomplete work honestly. Choose a per-run and per-day budget with defined behaviour for approaching and exceeding them, then simulate a budget stop and check what the run says about what it didn't do.
Loading your workspace…