Skip to content

Sessions and cost

How full a session is gets measured, not estimated — the real token count, read every turn, the same figure /context reports. One warning at 75%, one more at 90%, and neither interrupts your turn.

The standing cost is published, not hidden. The discipline plus every agent and skill description load into each session: 32,107 bytes, measured by smoke-test.sh. A real claude -p turn in which 21,804 bytes of the same material cost 9,198 tokens gives the ratio; at that ratio this is about 13.5k tokens. The byte figure is what the suite gates. Each skill you add is a permanent ~100-token tax on every session, so a byte budget per component is enforced as a gate. Raising it takes an explicit edit to the test.

Why not install fewer components? Because it buys almost nothing. Every agent and skill description together is 14,946 bytes, about 6.3k tokens at the same ratio; leaving out the four UI skills and the frontend agent saves 1,587 of those bytes — roughly 670 tokens. That is worth controlling per component, which the byte budget does, rather than per project.

Most of what a session costs is the model that runs each piece of work, so that is chosen per task and not per session. A crew-* agent is called with a card (the files, the kind of change, the command that proves it), and the card decides: haiku where a command checks the work, sonnet for ordinary work and for anything nothing can verify, opus for critical work (a migration, security, architecture, an unknown-cause bug, or a file under auth, payments, migrations and the like). Prose is the exception both ways: a text change runs on haiku with no command to check it (a reader is all prose ever has, and a commit message is checked by the commit hook), and on a critical path it is written on sonnet while its audit stays on opus. The call names an effort too: medium, low for a test run, never above high, since one more level past it costs about as much as the next model. When the agent stops, its verify command runs; work that fails it twice is repeated once on the same model at high (when it ran below), then once one model up. A model or an effort that was too small therefore costs one more run, and the expensive model is kept for the work that needs it. The built-in Explore agent, which only searches and reads, runs on haiku.

What that came to is recorded, one line per call, in .claude/state/model-outcomes.tsv, and stays in your project. Studio reads it (see the Studio page): the Models view shows, for each kind of task, the model, how often the first try passed, how often it was repeated one model up, and an estimated cost at API list price. A class whose first try fails too often is held one model up from then on; /crew-loosen lowers it again when you decide to.

The card’s model is also the default. A call that asks for more runs on the card’s model, unless the card adds a line above: <why>; one that asks for less is refused. Agents outside the crew have no card, so only the expensive end is held: a call asking for opus or fable without above: runs on sonnet, and so does a general-purpose call (or a project agent with no model of its own) that names no model, which would otherwise take the session’s. A session on haiku, and an agent whose definition names its own model, are left alone. Those agents are not in the record.

Claude Code’s advisor tool lets the model consult a second, usually stronger model mid-task. Crewforth never turns it on; /crew-doctor says whether it is on, on what, and from which settings file.

Its cost is its own. Each call reads the whole conversation at the advisor model’s rates, uncached: in one measured session a two-sentence answer on Sonnet cost $0.06 and the single advisor call behind it $0.15. The API keeps those tokens out of the response’s top-level usage. Claude Code counts them in /usage, and Studio’s session cost adds them and shows an Advisor line, with the number of calls and what they cost; a session with no call has no line.

It does not follow the card. An advisor that ranks below the model it would advise is not attached at all, so with a Sonnet advisor an agent on Opus (critical work) gets no advice. The advisor is not in model-outcomes.tsv.

Measured against Opus alone, it was not called. The same five review cases and one implementation task, run twice in each arm, 24 runs: with an Opus advisor on, Sonnet called it in none of its 12 runs, so that arm was Sonnet alone at Sonnet’s price. It caught 6 of 6 planted defects (Opus alone 5 of 6), 15 of its 31 findings were on a defect (Opus 9 of 26), both finished the task twice, in about the same time, for $1.06 against $2.23. A small sample, and it says nothing about the advisor’s value when it is called; it says that turning it on did not change what these runs did or cost. So Crewforth adds no rule for it. packaging/advisor-bench/ runs it again, and review-bench --advisor measures your own cases.

Turn it off with /advisor off, or for good with CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1. It needs the Anthropic API; on Amazon Bedrock, Google Cloud’s Agent Platform or Microsoft Foundry it is not available.

One line under the prompt says what Crewforth’s hooks know about this session:

🛡 BLOCK §4.2 · ✓ commit approved 24m · ⚙ 2 crew agents · 🔋 34% · ~$1.20

The gate’s last word in this session, an approval you gave for a commit or a push that still holds, the crew agents started in this session and still running, the context fill Claude Code measured, and what Claude Code puts the session’s cost at. Each part shows only when there is something to say, and nothing from before the session: the gate log carries no time, so a line from last week would otherwise read as now.

The installers set it only where no status line is set, in the project or in your own settings, because the project’s setting would win over yours. With one of your own, they leave it and /crew-doctor says how to turn Crewforth’s on. The plugin edition cannot set a status line.

When the project has a plan (docs/PLAN.md, written by /crew-plan), the line ends with how many of its tasks are done: 📋 7/12. /crew-todo opens the panel under the line, and the same command closes it:

📋 Export — Plan · 7/12 done · phase 2/3 · AC 3/5
✓ Phase 1 — Parser 4/4
◐ Phase 2 — Panel 3/5
✓ 6. Draw the lines
◐ 7. Wire the toggle
☐ 8. Cache the drawing
☐ Phase 3 — Docs 0/3

Done tasks are ticked (✓), the task in work has a half-filled circle (◐), open ones are boxed (☐); a phase gets ◐ once it is started. When no task is marked in work, the first open one is shown as ☐ … ← next, never as in work. Only the phase in work is opened up; a long list is cut to a window around the task in work, and CREW_TODO_LINES sets the height (14 lines by default). The panel reads the plan’s own boxes: - [ ] open, - [x] done, - [~] in work, each heading a phase, and only what is under the ## Tasks heading when the plan has one (in a file that keeps several plans, the last Tasks heading that holds a task). It never ticks a box itself; the plan says to tick a task when its check passes. With no plan file yet, /crew-todo writes an empty one, and every call brings the file up to date with the plan made in the conversation (approved in plan mode, returned by crew-planner, or a task added or finished since): the panel and Studio read only the file. /crew-todo <file> reads another plan, /crew-todo show prints the panel in the chat.

The panel follows the work in progress, not whichever plan happens to be on disk. A status: line in the plan’s head says whether it is: when the work on a plan stops, its status: becomes paused (or dropped, or done), and the line drops its count and the panel shows one line saying the plan is paused, instead of a task nobody is working on. The plan’s own rules tell whoever works it to set that line when the user stops or replaces the work; /crew-todo pause and /crew-todo resume set it directly. Redrawing costs nothing while the plan stands still: the drawing is cached until the plan changes.

When the context is compacted, the model keeps its own summary of the conversation. Just before that, the precompact-snapshot.sh hook writes down what the files and the gates say: the branch, the uncommitted files, the last refusal in the gate log, the findings on record under .crewforth/, and whether a handover is there, at most about 2 KB, inside the repository’s git directory so it is never committed. When the session starts again after the compaction, session-rehydrate.sh gives that back, to the same session only. The hook never blocks the compaction.

Studio’s session card says how full the context is and how much of the text in it since the last compaction is tool output (141k ctx · 55% tool output), and, on hover, how many times the session was compacted and the last one’s tokens before and after. The share is counted in characters, not tokens: the transcript keeps no token count per message part.