Skip to content

Studio: Run cost — what a background run takes from your plan, before and after (#1056) - #1071

Draft
danielrispler wants to merge 19 commits into
mainfrom
issue-1056-run-cost
Draft

danielrispler wants to merge 19 commits into
mainfrom
issue-1056-run-cost

Conversation

@danielrispler

Copy link
Copy Markdown
Owner

Integration branch for spec #1056. Draft while tickets merge; the full body comes when it is marked ready.

Closes #1056
Closes #1058
Closes #1059
Closes #1060
Closes #1061
Closes #1063
Closes #1064
Closes #1065

🤖 Generated with Claude Code

danielrispler and others added 19 commits December 2, 2026 12:47
#1058)

Five First map drafts on Sonnet 5.5 cost $2.49 API price and moved the
5-hour window 24% to 30%; the week stayed at 64%. /usage spends no tokens
on a -p run, names no plan, and /status is unavailable there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n the plan's unit (#1059)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
background-runs.jsonl's line gains optional units, model and subject; a
view finds its runs' cost by subject once they are dismissed. settings.json
gains plan {kind, confirmed}, unknown when unset or malformed. Estimates
ride on the views with run buttons, actual costs on the views that keep a
run's answer and on the runs list's rows, and the 7-day total on the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ctual cost (#1063)

Draft the map, Back a law, Back this law, Start the run, Explore this,
Rebuild, Try again, Review map text, Run again and Retry show the view's
estimate; the Map draft's status line, Ratify's review line, the patch
review, a micro-world's row and each ended run show what it took, and the
runs list's head the 7-day total, drawn even with no run listed. Hovers
say where each figure comes from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`plotkeeper statusline` saves the plan's four numbers (the 5-hour and weekly
percentages and their reset times) in `plan-limits.json` in the data folder,
replaced on each call that carries `rate_limits`. Plan detection (`plan.rs`)
reads them when they are under a minute old, else `claude -p /usage` with
`--output-format stream-json --verbose`, only alongside background runs
(a before/after pair around the runs since the runner was idle, at most one
pair every 10 minutes) and on Detect again; never on a timer or page open.
An API key and Ultra settle from one reading; Pro or Max is guessed from the
first three pairs against the trial's factor. Detection writes `plan` with
`confirmed: false` and never over a confirmed plan. New commands:
`set_plan` (Change and Confirm) and `detect_plan` (Detect again).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	scripts/snap/fixtures.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment