[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

  1. 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.
  2. Budget per task. /budget $5 or /budget 30m in an interactive session:
  • at 80% → a notice
  • at 100% → pause and ask: continue (+$X) / stop / summarize progress and hand off
  1. Status line. Show spent vs. budget, for example $3.10 / $5.

Alternative Solutions

  • Watching /cost by 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

  1. I approve a plan to migrate a module to a new API. Claude Code estimates "~12 files, ~25 turns, roughly $3-6".
  2. I set /budget $6 and go to a meeting.
  3. 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.
  4. I come back, read the summary, and decide in 30 seconds.

View original on GitHub ↗