mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-05 01:08:50 +01:00
Priority 4 of the 2026-09-17 review: "Show agent, model, machine, and known cost/quota information before dispatch." All three were already settable on the project profile — agent, "Runs on", Model — as three separate controls, stacked, and nothing stated the combination. So the operator chose a builder in one row, a model two rows down, pressed a prompt button, and the first statement of what actually ran arrived afterwards, on the run record. Now, directly above the prompt buttons that dispatch: Dispatch runs Claude Code · opus · This computer [last run $0.42] COST IS THE LAST RUN'S, AND SAYS SO. What this dispatch will cost cannot be known before it runs, and a predicted number beside a button reads as a quote. What the previous run on this project cost is measured, and it is the best available answer to "what am I about to spend" — labelled as the past, in the tag and in its title text, never as an estimate. A real sub-cent run renders "<$0.01", not "$0.00". Rounding a run that cost something down to free is exactly the move that turns a measurement back into a claim, and it is pinned by a test. QUOTA IS EVIDENCE, NOT A BLOCK. The one piece available without asking anything: the previous run here died with capacity language (looksLikeAgentCapacityIssue, the same predicate the provider chooser uses). Quota refills, so the caution says "may still be spent" and leaves the decision with the operator. An ordinary crash is not evidence about quota, which is also pinned. Nothing is invented: a project that has pinned no builder gets no machine in the sentence, and an agent with no model choice gets no empty slot. On the standing model instruction — Opus preserved, Fable excluded: there is nothing to exclude. `fable` does not appear anywhere in this repo (the two grep hits are the word "undiffable"), and this change adds no model list of its own; it renders whatever the agent registry already offers. Tests: 7 cases, proved by mutation — dropping the sub-cent branch fails with actual '$0.00'. tsc clean, lint 0 errors, check:design ok, test:unit 205/205. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>