Paths Subjects Questions Quizzes Pricing Search
Advanced Open Pro

Diagnosing Why Turn Caps Alone Weren't Enough

A nightly triage job runs claude -p once per open issue with --max-turns 8 and no --max-budget-usd. Most nights it costs about $2 total across ~40 issues. One night, cost jumps to $40, but the run still completed within its turn caps for every issue — nothing errored out or hit the 8-turn ceiling.

  1. Give a concrete mechanism by which a run can stay within --max-turns and still spend far more than typical.
  2. Why would adding --max-budget-usd catch this failure mode when --max-turns alone didn't?
  3. Besides adding a budget cap, what's one change to the prompt itself that would reduce the chance of this recurring?

Share this question

← Back to Headless Mode, CI Automation & the Agent SDK practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.