Skip to content

Fix what the review of spend and budgets found - #63

Merged
danielehrhardt merged 1 commit into
mainfrom
fix/budget-review
Oct 4, 2026
Merged

danielehrhardt merged 1 commit into
mainfrom
fix/budget-review

Conversation

@danielehrhardt

Copy link
Copy Markdown
Contributor
  • A run is held only when it would start now: a queued run no longer
    takes the chat's pause while another run in that chat works (that run
    could fail when it asked a question, and couldn't be paused).
  • A stretch is booked once, after its pause is saved.
  • "Let it run", Run now and the human continuing a run keep it past a
    used-up budget through later pauses (migration 55: paused_runs.exempt);
    what such a run hands over is exempt too.
  • A follow-up's "Continue now" and an app/webhook automation's Run now
    (test event) aren't held.
  • Messages from Slack, Telegram or Teams are held like unattended work,
    so nobody in a channel spends past the owner's budget; they're told the
    chat is on hold.
  • Held work is looked at again only when a budget amount changes (a
    restore no longer lets holds go by themselves); a run still held by the
    other budget shows that budget, and "Raise budget" opens the right one.
  • The meter counts only held runs it can let run; Send now in a held
    chat says it lets the run past the budget; Claude is told the turn was
    held, not paused by the human; runs cut off by a crash are booked at the
    next start.

Checks

  • pnpm typecheck: all packages pass
  • Core tests: 1402 pass, 10 skip, 0 fail (new cases in budgets.test.ts)
  • Desktop build and phone type check pass

- A run is held only when it would start now: a queued run no longer
  takes the chat's pause while another run in that chat works (that run
  could fail when it asked a question, and couldn't be paused).
- A stretch is booked once, after its pause is saved.
- "Let it run", Run now and the human continuing a run keep it past a
  used-up budget through later pauses (migration 55: paused_runs.exempt);
  what such a run hands over is exempt too.
- A follow-up's "Continue now" and an app/webhook automation's Run now
  (test event) aren't held.
- Messages from Slack, Telegram or Teams are held like unattended work,
  so nobody in a channel spends past the owner's budget; they're told the
  chat is on hold.
- Held work is looked at again only when a budget amount changes (a
  restore no longer lets holds go by themselves); a run still held by the
  other budget shows that budget, and "Raise budget" opens the right one.
- The meter counts only held runs it can let run; Send now in a held
  chat says it lets the run past the budget; Claude is told the turn was
  held, not paused by the human; runs cut off by a crash are booked at the
  next start.
@danielehrhardt
danielehrhardt merged commit ae5b8f4 into main Oct 4, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant