Skip to content

Say what resuming a run's lead is likely to cost, before it is spent - #116

Merged
ntatschner merged 1 commit into
mainfrom
resume-cost-estimate
Sep 24, 2026
Merged

ntatschner merged 1 commit into
mainfrom
resume-cost-estimate

Conversation

@ntatschner

Copy link
Copy Markdown
Owner

team resume now says what the lead's next turn is likely to cost, before anything is spent.

Why

Run 20260923-1216-be60 was resumed at $109.47 of a $120 budget, and its lead spent $15.08 in one turn of 14 exchanges. A long session carries its whole conversation into every exchange. The budget is checked between rounds, and a turn that crosses it finishes: stopping a node mid-turn loses what was already paid for. Checking more often would not have caught a single turn. Nothing said beforehand that this was likely.

What it does

  • Where the lead resumes its own session, team resume prints what its last turn cost and over how many exchanges.
  • It warns when that is more than the budget has left, or when the budget is already spent.
  • A fresh lead gets no figure: it starts small, and the old conversation's cost would overstate it.
  • The dashboard's Resume runs the same command, and --dry-run shows the line too.
  • The budget check itself is unchanged.

Against the real be60 run, team resume --dry-run now prints:

The lead's last turn cost $15.29 over 2 exchange(s), and it carries that whole conversation into the next, so expect about as much.

Evidence

  • ResumeCostTests: five cases, including the be60 figures ($15.08 against $10.53 left).
  • Mutation-checked: counting every node's turns, warning against the whole budget rather than what is left, and giving a fresh lead a figure each fail a test.
  • Full suite: 3373 passed, 0 failed, 22 skipped.

Run 20260923-1216-be60 was resumed at 109.47 of a 120 budget, and its
lead spent 15.08 in one turn of 14 exchanges: a long session carries its
whole conversation into every exchange. The budget is checked between
rounds, and a turn that crosses it finishes, because stopping a node
mid-turn loses what was paid for; checking more often would not have
caught one turn. Nothing said beforehand that this was likely.

team resume now says, where the lead resumes its own session, what its
last turn cost and over how many exchanges, and warns when that is more
than the budget has left, or when the budget is already spent. A fresh
lead gets no figure: it starts small and the old conversation's cost
would overstate it. The dashboard's resume runs the same command, and
--dry-run shows it too. The budget check itself is unchanged.

Tests: ResumeCostTests, five cases including the be60 figures.
Mutation-checked: counting every node's turns, warning against the whole
budget rather than what is left, and giving a fresh lead a figure each
fail a test.
@ntatschner
ntatschner merged commit a942fa5 into main Sep 24, 2026
14 checks passed
@ntatschner
ntatschner deleted the resume-cost-estimate branch September 24, 2026 21:22
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