[FEATURE] Estimate before a task, plus a per-task budget that pauses instead of overrunning
Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 11, 2026
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
For anything bigger than a small fix, I find out only at the end whether a task cost $0.50 or $15, or took 3 minutes or 40.
With auto-accept, background agents and long sessions, a task can wander or loop while I'm not watching. The limits I'm aware of apply to headless runs or to the whole account, not to "this task in this interactive session".
Proposed Solution
- Estimate after planning. When a plan is approved, or on request with
/estimate, show a rough range: files likely to be touched, turns, and tokens or cost. The range can come from the plan plus past sessions in the same repo. A range is fine; an order of magnitude is already useful. - Budget per task.
/budget $5or/budget 30min an interactive session:
- at 80% → a notice
- at 100% → pause and ask: continue (+$X) / stop / summarize progress and hand off
- Status line. Show spent vs. budget, for example
$3.10 / $5.
Alternative Solutions
- Watching
/costby hand: doesn't help when I've stepped away, which is exactly when overruns happen. - Account-level spend limits: these stop everything rather than pausing one task in a resumable state.
- Related, closed: #66048 (cost limit for unattended runs), #55779 (estimate before approving plan-mode tasks), #68703 (cost confirmation for heavy skills). This request combines them into one estimate-then-budget flow for interactive sessions.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
- I approve a plan to migrate a module to a new API. Claude Code estimates "~12 files, ~25 turns, roughly $3-6".
- I set
/budget $6and go to a meeting. - Claude gets stuck on a flaky test and hits $6. Instead of continuing, it pauses with a summary: done (10 files), stuck (one test, likely flaky), and the suggested next step.
- I come back, read the summary, and decide in 30 seconds.