Dispatch Economy Reference

This page holds the facts of the dispatch economy. Read it to find one fact. How one dispatch runs, where the money goes and what to do after a denial are on Dispatch Economy. Jev, the external decision model, is on Decision model (Jev). The routes, hooks, installed files and state files are on Agent Harness.

evidence §N on this page cites section N of the evidence file named in Evidence.

Terms

  • Jev is the external decision model that settles cost-only choices. See Decision model (Jev).

  • A Pick line is the Pick: <model>/<effort> - <source>/<source> line that a producer brief carries. See Model and effort.

  • A dispatch is one Agent call that starts a sub-agent. The hooks match the tool names Agent and Task.

  • A producer is a sub-agent that writes: a coding agent, or ft-ui-ux-design.

  • A reviewer is a read-only sub-agent: verifier, ft-test-adversary or ft-architecture-audit.

  • A lane is one running top-level orchestrator.

  • A unit is one bounded piece of work for a coding agent.

  • A DoD (definition of done) is the measurable condition that ends a unit.

Model and effort: two picks on every dispatch

Every dispatch of a producer (a coding agent, or a child orchestrator in slice mode) names BOTH model and effort. If either is missing, the agent’s frontmatter default is paid silently. The two picks are independent. A wide mechanical change is sonnet/low. A three-line fix to a retry condition is small but high.

model The unit is…​

haiku

fully specified by the brief: files and symbols named, a precedent to copy, at most 3 files and ~60 changed lines, tests extend an existing class.

sonnet

standard work inside one module: a new file or class on an existing pattern, a new test class, branching logic, more than ~60 lines.

opus

no precedent; concurrency, transactions or caching; a security or auth surface; contract, protocol or schema design; cross-module; behaviour the brief cannot fully state.

effort The unit needs…​

low

transcription: the brief names every edit and the precedent.

medium

ordinary choices inside a known pattern. The default when unsure.

high

reasoning rather than volume: interacting conditions, failure paths, ordering, an open design choice.

Start at haiku and move up only for a signal you can cite (file:line, a section of the design brief, a count). An opus signal goes straight to opus. Security or contract design is never sent through a cheaper model to see whether it fails. fable is refused by price-gate.py on every dispatch, except for a session the owner lists in ~/.local/state/ft-ai-toolkit/fable-exception.json before its until time; only the owner edits that file. The owner’s live fable window was retired on 2026-11-06: about 2x the cost in the peered roles with no measured gain (~/.local/state/ft-ai-toolkit/run/2026-11-06-fable-ab-final.md). xhigh and max are used only when you ask for them.

Every producer brief carries three lines that the gate checks:

  • Size: files <n> · lines ~<n> lets the gate check the unit cap against a number.

  • Raise: …​ lists the signals that make a receiver stop and return TIER_RAISE: <model> - <signal>.

  • Pick: <model>/<effort> - <model source>/<effort source> names where each value came from. Each source is jev, self or override. A self adds (unsure: <tier|model|effort>). An override adds : <cited signal>. Example: Pick: sonnet/medium - jev/self (unsure: effort).

Escalation

After every unit the orchestrator checks the DoD and what the unit delivered against the pick. New files count (git status --porcelain, not only git diff). An unmet DoD gets ONE repair on the same model, then a fresh dispatch one model up. A model that failed twice does not get a third try. The orchestrator honours a TIER_RAISE without argument. A failure caused by a wrong brief goes back to the plan, never up a model.

Unit size

A run costs roughly the square of its length, and a dispatch pays a fixed entry price first (about 30K tokens). So split long work and never split short work.

  • Bounds per model: haiku at most 25 tool calls and 10 minutes, sonnet 40 and 20, opus 60 and 30.

  • Hard cap per unit: about 400 changed lines or 10 files, except a set that does not build half-applied.

  • price-gate.py denies a producer dispatch whose Size: line declares more than 500 lines or 12 files and does not say atomic.

  • Nothing below about 15 predicted tool calls is split. Merge it instead.

  • A slice is a child ft-developer in Mode: slice that runs a part of the approved plan. A slice pays only from 8 leaf dispatches up. Slices run serialized on the same working tree.

Review dispatches: priced by the lens

verifier, ft-test-adversary and ft-architecture-audit dispatches name model and effort too. They carry no Pick: line and no Jev question. The table decides.

Pass model effort

Judgment lens, first pass: Security, Correctness, Requirements-coverage, Performance, Visual/UX (the browser executor); the test adversary

opus

high

Mechanical lens, first pass: API-contract, FT-standard / Architecture conformance, Clarity, Test-plan adequacy

sonnet

medium

Re-check of a lens that already ran (the objection delta, the same evidence pack; a later adversary pass)

the first pass’s model, never cheaper than the one that objected

medium

A material revision re-runs lenses as first passes. A CRITICAL change raises a mechanical lens to opus. A re-check should not pay first-pass depth to read a delta (evidence: review rounds).

These rules cut the number of review rounds (tiering.md §1a, §2):

  • Round 1 runs the route’s whole lens set. No lens waits for a later round because of the run-cost budget, a refused dispatch or a stopped app.

  • A revision closes the class, not the instance. Before a re-check, the orchestrator does four things for each answered objection:

    • It sweeps the sibling sites.

    • It brings every prose surface that names the changed mechanism in line.

    • It follows the mechanism to every path that reaches it.

    • It adds a test cell that fails without the fix.

      The re-check brief carries <ID> closed · fix · siblings · prose · cell per objection. ft-developer names that line itself at checkpoints D and F.

  • The assembled gate list comes from grep. ft-developer Stage 7 and the bugfix-agent gate add every src/test class that references a touched package or scans source trees (*GuardTest, *SourceScan, *ManifestTest, catalog and coverage guards). They add these classes, not only the tests the units named. A verifier lens that calls code precedent-conforming cites the run of the guard that pins the precedent, or returns NEEDS_EVIDENCE and names it.

  • One pass, every finding; one batch, every ID. A reviewer exhausts its lens before returning. It tags each opened ID blocking or note. Only a blocking ID refutes. A lens whose IDs are all notes is SOUND and is not re-checked. On a re-check, an ID opened outside the revision’s delta is also missed. The orchestrator triages only when the whole round is back. It fixes every open ID of the round, notes included, in ONE revision of the design brief or one repair brief per zone. deploy/evals/round-watch.py measures the rounds against the recorded baseline.

The price gate

price-gate.py runs on PreToolUse for Agent|Task|SendMessage. The pricing checks (problems) act when ft-developer or bugfix-agent dispatches. The other checks act on any caller. On SendMessage the hook applies only the 200K continuation line.

What the pricing checks deny

The hook denies and names every missing item at once:

Dispatch Denied when

A producer (*-coding-agent, ft-ui-ux-design, or ft-developer in Mode: slice)

no model or effort; no Size: or Raise: line; no valid Pick: line, or one that disagrees with the call; a dispatcher whose own transcript holds no decide.py call (exempt: an error note, or (recorded: <journal path>) naming a file that holds the Jev answer an earlier instance got); a model override to haiku; outside Mode: slice, a Size: line over the unit cap

A review role

no model or effort; haiku; the test adversary, or a verifier whose description names a judgment lens (Security, Correctness, Requirements, Performance, Visual/UX), on anything but opus (fable is allowed in a session the owner granted in fable-exception.json, before its until; first pass and re-check alike; the test adversary may leave opus only with a Pick: <model>/<effort> - jev/<source> line); a re-check (round 2+) that names objection IDs with no <ID> closed · fix <file:line> · siblings …​ · prose …​ · cell <test> line, in the brief or in a brief, pack or ledger file it names (Closure: n/a - <reason> for a lens with nothing of its own to re-check: first pass of this lens, no objection of yours is open, or SOUND in round <n>, re-run because the revision touched <area>)

The dispatch is not paid for. The orchestrator fixes the dispatch and sends it again. A denial for a missing item ends with the lines to paste, with <placeholders> to fill. The gate fails open: an error of its own denies nothing. The exceptions are the trivial fix and the delta fix: an error in their checks denies the fix and the run takes FIX_LANE. python3 ~/.claude/hooks/price-gate.py --selftest runs its cases offline. python3 ~/.claude/hooks/price-gate.py --delta-paths <worktree> <sha> checks the paths of a delta fix (see Quality Pipelines Reference, Delta fix). python3 ~/.claude/hooks/price-gate.py --trivial-check <worktree> <tf-tree> checks the edit of a trivial fix (see Quality Pipelines Reference, Trivial fix).

The lane cap

The same hook caps the main loop’s lanes. It denies a new top-level ft-developer, bugfix-agent or refactor-agent (not a Mode: slice child) while FT_MAX_LANES of them are already running. The default is 6. FT_MAX_LANES is a setting: raise it for a machine that runs more lanes. turn-guard.py counts a running child.

The cap is a different number from the lane target in the main loop’s status line (lanes <running>/<target>). The cap counts top-level orchestrators only. The target counts every running background agent, helpers included. The lane-nudge.py hook compares the count with the target, so a cap below the target can deny the launch that the nudge asks for. See Agent Harness Reference, The lane nudge.

The limit follows the concurrency cap of the session. The default cap is 20 sub-agents (CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS), and the installer sets 30. One checkpoint fans out six lenses.

Every check, in the order it runs

A deny check refuses the dispatch with its reason. All deny checks run, so one failing check never hides another, with two exceptions. boundary_a runs only when problems found nothing, and its denial stands alone. continuation_cap is the only check on SendMessage. A swap check lets the dispatch through with a changed model, and sometimes a changed effort or an added brief line. The first swap that applies wins. A note adds context for the dispatching agent and denies nothing. The hook logs swaps to tier-ab.jsonl. A malformed numeric knob in the last column (for example FT_UNIT_MAX_LINES=abc) falls back to its default, so a typo in a setting never switches a check off.

Check Kind What it does Off / knob

problems

deny

The pricing and review checks of the previous table, for the two pipeline dispatchers. The denial reasons of problems print after the reasons of the other deny checks.

None

boundary_a

deny once

The first Stage 6 unit of an opus orchestrator whose boundary-A trigger holds: reset first. It runs only when problems found nothing, and it denies alone. A second send of the same dispatch passes.

FT_BOUNDARY_A=0

boundary_hold

deny once

The boundary hold of context.md section 1. The context note rides an allowed dispatch, so the orchestrator reads it when a child is already out. The hold denies the next boundary-shaped dispatch of a root ft-developer with the move that the note named. The agent must have no parentAgentId, Resets: handled in its launch brief, and a last turn with more than FT_RESET_CTX tokens. The boundary-shaped dispatches are the first lens of a round (a NE, a NEEDS_EVIDENCE or a re-run passes) and a Stage 6 producer that is not the first unit, a repair or a continuation, when no Stage 7 review has run. It never holds the first dispatch of the agent, a simple-addition run, a run whose move is none or unreadable, or a run whose bound root cannot pay the relaunch plus FT_BOUNDARY_HOLD_RESERVE held resends. To pass, append a ## Boundary hold — pass <time> block with one reason: line after the last journal block. Then send the same dispatch again with the same subagent_type and description. A resend always passes, also after a compaction. A dispatch within the batch window of the last event is held with it. The hold allows FT_BOUNDARY_HOLD_MAX events for each compaction epoch. It runs after every other refusal, and a held spawn is not paid for. It defers a dispatch and never removes a gate or a lens.

FT_BOUNDARY_HOLD=0, FT_BOUNDARY_HOLD_MAX (3), FT_BOUNDARY_HOLD_RESERVE (4), FT_BOUNDARY_HOLD_STATE

reset_cap

deny

A relaunch carrying Resets: handled whose journal HANDOFF shows resets 3 or more. For a registered group or merge journal the limit is more than FT_GROUP_RESETS resets. A relaunch is also denied when its root already holds FT_LINEAGE_MAX instances. The launcher never raises these caps. See Lineage bounds.

FT_GROUP_RESETS (2), FT_LINEAGE_MAX (10)

lane_cap

deny

A new top-level orchestrator while FT_MAX_LANES are running.

FT_MAX_LANES (6)

design_cap

deny

A checkpoint-D review past round 3.

FT_DESIGN_CAP (3)

review_cap

deny

An ft-developer dispatch of verifier* or ft-architecture-audit for checkpoint-F round 3 or later. The exceptions are the trivial re-check (cpF r3 trivial-fix <lens> re-check), which the hook grants once for each journal, and the delta re-check (cpF r3 delta-fix <lens> re-check), which the hook grants once for each lineage root. The re-check round is FT_REVIEW_CAP + 1, so cpF r3 at the default cap. The denial prints the FIX_LANE recipe. The test adversary and every other caller pass. The hook reads the round from the description (cpF r3, cpF U2 r3, cpF round 10, checkpoint F round 3), else from the line Checkpoint F, lens <X>, round <n> in the head of the brief. A cited objection ID such as closes R3 is not a round.

FT_REVIEW_CAP (2)

lineage_charge

deny

A dispatch by an ft-developer instance that is bound to a lineage, past the agent-run budget of that lineage. Reviews are counted and never denied. See Lineage bounds.

The launcher’s Run-cost raise: line

lineage_message

deny

A SendMessage of the main loop that carries a Run-cost raise: line the hook cannot record. The hook refuses the whole message, writes nothing, and prints the corrected line. The reasons are in Raise refusals.

Send the message again with the corrected line, or without it

ops_opus

deny

A general-purpose or Explore on opus without an Opus: <why> line; ft-ops on opus at all.

FT_OPS_OPUS=1 allows the latter

integ_batch

deny

A bugfix or coding lane whose brief merges 3+ named branches: that is an ops batch.

an Integration: <why> line

adversary_model

deny

The test adversary below opus from any caller, unless Jev DECIDED it (Pick: …​ - jev/…​; §58, §59). fable is allowed in a session the owner granted in fable-exception.json.

None

lens_model

deny

A judgment lens below opus from a caller that problems does not check. fable is allowed in a session the owner granted in fable-exception.json. The denial ends with model: opus / effort: high (ft-fix SKILL.md lists the line per lens tier).

None

major_route

deny

A main-loop MAJOR/CRITICAL bugfix-agent that /ft-fix did not send. A brief that names MINOR, a Resumed from a reset relaunch, and a Pipeline: ft-fix line after the skill ran all pass.

FT_MAJOR_ROUTE=0

host_route

deny

A general-purpose told to run /ft-fix: send ft-fix-host.

FT_HOST_ROUTE=0

ops_route

deny

A general-purpose ops batch (description starts "Ops", or the brief’s head names an ops agent, task, job or lane, or an integration lane): send ft-ops. So is a main-loop bugfix-agent whose description is a rebase, cherry-pick or re-land naming no fix, repair, implementation or test (§69). Status page refreshes and read-only research pass.

FT_OPS_ROUTE=0

ux_change

deny

A main-loop Mode: change of ft-ui-ux-design with no Size: line, or one over the unit cap: it is one unit, and a larger build goes to /ft-dev.

an atomic: <why> in the Size: line

continuation_cap

deny

SendMessage to a leaf over 200K of context: dispatch a fresh one.

FT_LEAF_CTX (200000). checkout-guard.py reads the same variable for the leaf context note (Leaf hand-back).

tier_ab

swap

An orchestrator’s self-picked opus coding unit, or a doubtful Jev opus, runs on sonnet. Details.

FT_TIER_AB=0, FT_TIER_AB_SPLIT=1, FT_TIER_AB_JEV_MAX (0.9)

repair_ab

swap

A fresh opus coding repair runs on sonnet. Details.

FT_REPAIR_AB=0, FT_REPAIR_AB_SPLIT=1

orchestrator_ab

swap

Jev picks a top-level `ft-developer’s model and effort after its Stage 5 approval. Details.

FT_TIER_AB=0

bugfix_ab

swap

Jev picks a main-loop `bugfix-agent’s model and effort. Details.

FT_TIER_AB=0, FT_BUGFIX_JEV_SPLIT=1, FT_BUGFIX_JEV_MAX

refactor_ab

swap

Jev picks a main-loop `refactor-agent’s model and effort.

FT_TIER_AB=0

recheck_ab

swap

Jev may run a judgment-lens re-check on sonnet. Details.

FT_TIER_AB=0

mech_lens

swap

A mechanical lens sent on opus or with no model runs on sonnet/medium.

FT_MECH_LENS=0

host_ab

swap

A non-CRITICAL bug’s ft-fix-host runs on sonnet. Details.

FT_HOST_AB=0, FT_HOST_AB_SPLIT=1

inherit_pick

swap

A general-purpose or Explore with no model runs on sonnet.

FT_TIER_AB=0

context_note

note

A top-level orchestrator past 250K is told a reset is due at its next boundary.

FT_RESET_CTX (250000)

main_note

note

The main loop past 300K is told, once per 50K of growth, to hand ops to one ft-ops and ask you for /compact.

FT_MAIN_CTX (300000) is the threshold. FT_MAIN_STEP (50000) is the growth between two notes.

touch_note

note

A coding brief with no Touch: line (the symbols to edit): the leaf reads through the graph and short windows. Printed once per 60 s per session, like context_note and main_note, so a parallel batch carries it once.

FT_NOTE_BATCH_S (60)

lane_note

note

A top-level lane stopped since the main loop’s last dispatch (turn-guard.py stamps it; a SubagentStop hook cannot reach the parent): lane ended: <n> running; refill to the owner’s target now unless the backlog is empty. It fires only at a dispatch, so a loop that dispatches nothing never sees it. The lane-nudge.py hook covers that case at the end of a turn.

None

checkout-guard.py adds the bugfix-side context note. A bugfix-agent launched with Resets: handled is told once, past 250K, that a reset is due (FT_BUGFIX_NOTE=0 turns it off).

Swaps: Jev picks the model, sonnet replaces a guess

price-gate.py swaps the model through the hook’s updatedInput and logs every pick to ~/.local/state/ft-ai-toolkit/tier-ab.jsonl. FT_TIER_AB=0 turns off tier_ab, orchestrator_ab, bugfix_ab, refactor_ab, recheck_ab and inherit_pick. repair_ab, host_ab and mech_lens have their own settings. deploy/evals/tier-ab-report.py reads the picks, climbs and outcomes (evidence §17-§19). The table details each swap.

Check Trigger Effect

tier_ab

A coding first dispatch where Jev was UNSURE and the orchestrator picked opus itself.

Always sonnet. Jev is not asked again. The brief tells the leaf to open its report with TIER_AB: sonnet, so a failed unit still gets its opus attempt (tiering.md §2). FT_TIER_AB_SPLIT=1 brings back a 50/50 split. A jev opus pick whose tier: DECIDED opus answer is under FT_TIER_AB_JEV_MAX (0.9) also runs on sonnet. An answer whose number is not found counts as doubtful (conf null).

orchestrator_ab

A main-loop launch of ft-developer whose journal is past a granted Stage 5 approval.

The hook asks Jev’s run and effort presets over a descriptor built only from flags and counts of the brief, never its text. DECIDED is taken. UNSURE falls back to sonnet and the dispatch’s own effort. One answer per journal, so a reset instance keeps its run’s model. Design (Stages 1-5) always stays on the frontmatter model. See the notes below the table.

bugfix_ab

A main-loop bugfix-agent whose brief names MINOR, or names neither MAJOR nor CRITICAL.

Same Jev run and effort presets. One answer per description. A relaunch keeps its run’s model, found by the brief it quotes or the brief file it names, also when a severity word precedes "Resumed from a reset" (§58, §63, §70). A Jev opus stays on opus, whatever its confidence. FT_BUGFIX_JEV_SPLIT=1 runs a 50/50 split of the Jev opus answers under FT_BUGFIX_JEV_MAX (0.9).

refactor_ab

A main-loop launch of refactor-agent.

Same Jev presets over the whole run (the launch is one-shot).

recheck_ab

A verifier re-check of a judgment lens (description names re-check or delta; not Security, not a CRITICAL brief).

The dispatcher still sends opus (tiering.md §1a). The hook asks Jev’s recheck preset over the lens, checkpoint, round, the count of objection IDs and the run_state flags. Only a DECIDED sonnet changes the model. UNSURE keeps opus. The row keeps the objection IDs, so you can read checkpoint F for one that a sonnet re-check passed.

host_ab

Every non-CRITICAL bug’s ft-fix-host.

Runs on sonnet. FT_HOST_AB_SPLIT=1 brings back a 50/50 split by a hash of the bug. FT_HOST_AB=0 turns it off.

inherit_pick

A general-purpose or Explore dispatch that names no model.

sonnet instead of the caller’s inherited opus. A named opus is refused (ops_opus) unless the brief carries Opus: <the judgement it must make>.

mech_lens

A mechanical lens sent on opus or with no model.

Runs on sonnet. A missing effort becomes medium. A CRITICAL brief, and a description that also names a judgment, regression, parity or caller lens, are not changed.

repair_ab

A fresh opus repair of a coding unit.

Runs on sonnet. The repair opens its report with TIER_AB: sonnet. A climb (TIER_AB, TIER_RAISE other than the brief’s standing instruction, "one model up"), an override pick, and a unit whose earlier attempt in this instance ran on sonnet are never flipped. So a failed sonnet repair still gets its opus attempt (tiering.md §2). Rows are kind: repair. FT_REPAIR_AB_SPLIT=1 brings back a 50/50 split by the tool_use id. FT_REPAIR_AB=0 turns it off.

Notes on orchestrator_ab and bugfix_ab:

  • When a run counts as past approval. One of three conditions holds:

    • The last ## Stage heading in the journal is Stage 6 or later and is not a pre-edit baseline or a plan.

    • A Stage 5 approval is recorded that is not a gate reached, requested or conditional.

    • The brief itself grants the approval unconditionally (granted). The main loop’s grant reaches the journal only after the instance records it.

  • Which journal. The path after Journal: or --journal. In a launch whose first 300 characters say resume, relaunch, continuation run or CONTEXT_RESET, any .md directly in the run directory (evidence §47).

  • The descriptor. Stacks, repositories named, units in the plan, concurrency, transactions, security, protocol, schema, live environment, test-only (run_state). The hook reads the prose with inline code and the phrases credential helper and gh auth removed, so a push command does not count as a security surface.

  • For the orchestrator. The descriptor says that the approved design brief already records the decisions on the flagged surfaces. It also says that independent opus lenses review checkpoint F. The judgement flags read (decided in the approved SDD). That literal is the hook’s text, and "SDD" in it means the design brief. An answer given over bare flags is not reused: the run is asked again.

Leaf hand-back

A coding leaf that reaches the bound of its context returns Status: HANDBACK with a ## HANDOFF in its report. The canon is rules/agents/common.md, section "Context bound for coding leaves", and tiering.md §2, "A HANDBACK is not a failure". The triggers are the context note with more than about B tool calls left, the hard line, and the turn or wall-clock bound. A met DoD is never a hand-back.

  • No penalty. A hand-back gets no model raise and no repair round. The unit stays pending (handback <k>).

  • Continuation. The dispatcher sends ONE fresh leaf, never SendMessage. The description is <unit> continue (fresh), and the brief carries the line handback: fresh. The model and the effort stay the same.

  • Model stands. price-gate.py exempts a continuation in tier_ab. The continuation of a unit that is already logged (the latest record of that unit, any session) is left as sent and logs nothing: the model the dispatcher sent stands, also after a climb to opus. A continuation with no record is an ordinary first dispatch. repair_ab is not changed.

  • DoD. The DoD of the continuation is the original DoD minus the items whose proven: evidence the dispatcher re-checked. The unit’s own tests stay in it.

  • Size. The dispatcher judges the size of the unit as a whole with unit-check.py. The leaf has no size trigger.

  • Second hand-back. The dispatcher splits the remaining DoD by file set into new units before it dispatches again.

Context rules that the hook enforces

  • A leaf is not continued past 200K. tiering.md §2 repairs by continuing the same agent. The hook denies a SendMessage to any agent once its last turn carried more than 200K tokens (FT_LEAF_CTX). Exempt are the four orchestrators (ft-developer, bugfix-agent, refactor-agent, ft-fix-host) and general-purpose. An ops batch waits mid-work for the main loop’s answer. The denial says how to dispatch a fresh agent on the same model with only the delta and the unit’s saved report.

  • A leaf gets a note at 200K and a hard line at 400K. checkout-guard.py bounds a coding leaf (an agent type that ends with -coding-agent). Past FT_LEAF_CTX (200000), the first Bash call of the leaf gets one note. The note says to hand back only if more than about B tool calls of work remain. Past FT_LEAF_HARD_CTX (400000), the hook denies every new build or test runner. See Harness Reference, The leaf bound.

  • Bookkeeping by hooks. turn-guard.py saves a coding leaf’s final report verbatim to <run directory>/units/<unit>.md when the leaf stops. <unit> is the first word of the dispatch description. The run is the journal that the brief names, or its <run>-units/ directory when that exists. hooks/unit-check.py runs the after-unit check and journals it in one command. The check covers status, delivered size with untracked files, new-surface candidates and the over-bound verdict.

  • Reset on context size. Once an orchestrator’s last turn carries more than 250K tokens (FT_RESET_CTX), the hook adds a note to its next dispatch. The note is a trigger at every reset boundary.

  • Main loop at about 200K: a standing rule, not a hook. The main-loop rules from deploy/templates/claude-md/main-rules.md tell the main loop not to run operational batches itself. The main-rules.py hook delivers them. It hands rebases, merges and CI checks to ONE ft-ops. No hook enforces this rule. The main loop follows it.

  • Main loop at 300K: a hook note. Past 300K tokens of its own context (FT_MAIN_CTX), and once per 50K of growth (FT_MAIN_STEP), the hook adds a note to a main-loop dispatch. The note speaks to the main loop and says four things. The last one asks you, the person at the keyboard, to type /compact.

    • What each turn now costs.

    • Hand git, gh and status batches to ONE ft-ops and keep only decisions.

    • Write a handoff file up to date: open lanes with journals and agent names, rulings in force, what waits on whom, next steps.

    • Ask the person at the keyboard to type /compact, and name what the summary must keep: running agents with their ids, approvals that wait, open questions.

      The note does not ask for a fresh session. Background agents report to the session that launched them, and compacting keeps that session. A main loop cannot compact itself. The step is kept per session in ~/.local/state/ft-ai-toolkit/main-ctx.json. A turn back under 300K (a compact) starts the steps over (evidence §46, §48).

      In Terminal.app you need not type the command. The Stop hook main-compact.py types /compact keep: running agents with their ids, approvals waiting on the owner, open questions into the session’s tab when the last turn carried 300K tokens or more (FT_MAIN_COMPACT_AT). A hook cannot run /compact, so the script types it as a person does and then sends two more Enter keys, which submit a long draft. It waits at least 600 seconds between two commands of one session (FT_MAIN_COMPACT_GAP_S). It types nothing while you have typed within 30 seconds (FT_MAIN_COMPACT_IDLE_S), because the command would land in your draft. It also types nothing into a turn that continues: when lane-nudge.py blocked the same stop less than 60 seconds ago, or when the stop is the result of a hook block, the script skips the command. The detached sender checks the block marker a second time, 2 seconds after the start and before it types. A marker that appears later than that second check is not caught. FT_MAIN_COMPACT_KEEP replaces the text after keep:. In any other terminal the script does nothing, and the note above stays for you. FT_MAIN_COMPACT=0 or the file ~/.local/state/ft-ai-toolkit/main-compact-off turns the script off. The script reads the idle time once, before it types. If you start typing in the 4 seconds that follow, the two Enter keys submit your draft.

The orchestrator’s own context

Pricing the leaves does nothing about the orchestrator itself, the largest single cost. Every turn of an orchestrator re-reads all of its context (evidence: context growth).

  • One reset per instance, two per run, then a SPLIT (earlier by size, or after one reset). An orchestrator may shed its context at one of five boundaries. Boundary A needs two or more design rounds or 9 dispatches. The other boundaries need 9 dispatches by this instance. The context note past 250K also opens every boundary.

    Boundary Where

    A

    Stage 5 approved, before the first Stage 6 dispatch.

    C

    Inside Stage 6, between units.

    B

    The diff is frozen, before checkpoint F.

    R

    Between checkpoint-F rounds: the round’s verdicts are in the ledger, its repair batch is collected, the re-check is not yet sent.

    D

    Between checkpoint-D rounds: the verdicts are in the ledger, the revised design brief is written with its shasum, the re-check is not yet sent.

    At a boundary, everything that the next stage reads is already a file. The orchestrator then returns CONTEXT_RESET - <journal path>, and a fresh instance resumes from the journal.

    The orchestrator does this only when its launch prompt says Resets: handled. It does this only in a run that entered architecture-led, or in a TDD-led run at C, and at B and R when the run has a checkpoint F. A simple-addition run never resets. /ft-dev adds the Resets: handled line and relaunches with it.

    The instance stops at resets 2. At A or C it returns SPLIT - <journal> with the pending unit groups. It also SPLITs earlier, when the pending units form two or more disjoint groups and either the run owes more than 9 dispatches (about 250K of projected context) at A, or the instance has reset once (resets 1) at A or C. /ft-dev starts one fresh group instance for each group, then one merge instance. price-gate.py denies a relaunch whose HANDOFF shows resets 3 or more. A bugfix lane keeps its cap of 3. A group or merge instance has its own limit: see Lineage bounds.

    A resumed instance reads its HANDOFF and only the files its entry stage needs. The target is under about 110K tokens at the first dispatch. An instance that returned a reset or a split is retired. A main loop that launches ft-developer itself must follow the same rules. The main-loop rules on Agent Harness Reference tell it so.

    Boundary A holds at any context size. An opus instance whose trigger holds has its first Stage 6 unit denied once by price-gate.py. Stage 6 then runs on the relaunch’s model instead of opus. The A trigger stays as it is: a lean resume cuts the relaunch’s re-read cost.

  • Design rounds have a hard cap. Two rules end a design round early (tiering.md §2):

    • A blocking ID whose fix is wording only closes text-only without a re-check. Checkpoint F checks it on the code.

    • An empirical subject (latency, throughput, memory, size, ordering under load) that the same lens refutes twice becomes a measurement unit. The orchestrator dispatches it first in Stage 6, with a pass number and a fallback design, as a condition of the approval.

      Checkpoint D has a hard cap of three rounds. A design that every lens refutes in round 1 is a design split, not a round 2 (see Quality Pipelines Reference, Checkpoint D). price-gate.py denies a checkpoint-D review dispatch for round 4 or later (FT_DESIGN_CAP), and no ruling extends the cap. After round 3, each open blocker becomes a named checkpoint-F cell or a Stage 5 question to the human. A redesign is a new run.

  • Checkpoint F ends at round 2. price-gate.py denies a verifier* or ft-architecture-audit dispatch for checkpoint-F round 3 or later (FT_REVIEW_CAP, default 2). The run then writes a fix dossier and returns FIX_LANE. See Quality Pipelines Reference, Fix lane. The trivial fix replaces FIX_LANE first: one mechanical repair of a citation or a misspelt word and a re-check by the originating lens, once for each journal. See Quality Pipelines Reference, Trivial fix. If it does not apply, one bounded repair and a re-check by the originating lens can replace FIX_LANE once for each lineage root. See Quality Pipelines Reference, Delta fix.

  • A one-hour prompt cache for long waiters. These agents carry experimental: cacheTtl: "1h" in their frontmatter: ft-developer, bugfix-agent, refactor-agent, ft-fix-host, ft-ui-ux-design, ft-ops, ft-sdd and the four coding agents. They wait on children longer than the five-minute sub-agent cache lives, and each expiry rewrites their whole context. The reviewers (verifier, ft-test-adversary, ft-architecture-audit) and the doc writer keep five minutes.

  • ft-fix-host hosts a /ft-fix run. The main loop hands the run to this agent. price-gate.py refuses a general-purpose agent sent to host the skill (host_route). The rule applies in a session that can dispatch the host: the session started after the agent file, or an agent_listing_delta in its transcript told it of the agent (evidence §66). The hook runs the host on sonnet (host_ab). A brief naming CRITICAL in any case (unless it carries the upper-case MAJOR label) and a Climb: opus relaunch stay on opus. FT_HOST_AB=0 and FT_HOST_ROUTE=0 turn the two checks off.

  • An auto-compaction window of 600K tokens. Claude Code 2.1.299 offers no compaction setting for the main loop alone. autoCompactWindow and CLAUDE_AUTOCOMPACT_PCT_OVERRIDE both govern sub-agents too (sandbox-proven). 600000 sits above every review role’s peak context and below the main loop’s.

  • Leaves carry no tools they never call. The coding leaves (ft-java-, ft-coding-, ft-python- and ft-angular-coding-agent) declare disallowedTools:

    • Agent, and the artifact, workflow, cron, worktree, plan-mode and docs tools.

    • Skill, except for the Angular leaf, which loads design skills. The Skill listing alone is about 8K tokens.

      A skills: preload still loads with Skill denied. An entry that names a tool which is absent does not refuse the dispatch. Both facts are sandbox-proven.

Lineage bounds

A lineage is a root run journal plus every group, merge, reset and split instance registered under it. price-gate.py keeps the state in lineage.json. The hook is the only writer of that file. It takes a lock, writes a temporary file, and replaces the old file in one step. It never overwrites a file that it cannot parse. It evicts an entry that nobody touched for 7 days. Any error in this state fails open: the hook then counts nothing and denies nothing. The trivial fix and the delta fix are the exceptions: their admission checks fail closed to FIX_LANE. The state also holds cpf2 (the journals that dispatched a checkpoint-F round 2), delta (the granted delta fix of the root) and trivial (the trivial fix of each journal; the hook keeps the newest 16 journals).

Bound Rule Knob

Group reset budget

A group or merge instance starts its own count at resets 0, resets at most twice, and never makes a SPLIT. The prompt of the launcher says Reset budget: 2. A relaunch of a registered group or merge journal that carries Resets: handled is denied when its last HANDOFF shows more than 2 resets. Past its budget the instance goes on without a reset. Its turns and its context keep growing, and only its dispatches stay bounded.

FT_GROUP_RESETS (2)

Instances of a lineage

A lineage holds at most 10 instances, enforced under the lock. A relaunch that carries Resets: handled is denied when its root already holds 10.

FT_LINEAGE_MAX (10)

Agent-runs of a lineage

The lineage counts every dispatch of a bound instance that the hook allows, and every allowed relaunch. Past the budget, the hook denies every dispatch that is not a review, and every relaunch.

The launcher’s Run-cost raise: line

Registration and binding

  • A dispatch of ft-developer by an unbound launcher registers a group journal when its prompt has Resumed from a split, a Journal: J line and a Parent journal: P line. The hook maps J to the root of P.

  • Any other journal is its own root.

  • Every allowed Resumed from a reset or Resumed from a split relaunch adds one instance to its root.

  • An ft-developer caller binds to a root once. A slice child (its meta.json parentAgentId names an ft-developer, or an agent one launched) binds to the bound root of its first bound ancestor (its parent, or the nearest bound agent above a proxy such as general-purpose), never from prompt text; the Run journal: line of a slice brief is informational, and a child with no bound ancestor stays uncounted. Any other caller (an instance the main loop or a captain launched): the hook takes the line Journal: that stands on its own line before Original request: in its launch prompt. A miss is cached. Otherwise it binds on the first of its own dispatches whose brief carries a Run journal: line, and the dispatches before it are not counted (a bounded undercount that fails open). It never rebinds.

  • A caller that the hook cannot bind is never counted. The main loop is never bound. A brief that names another journal never changes the binding.

  • The hook reads orchestrator_ab for a brief with Parent journal: P from the approval of the root of P. A group instance and a merge instance therefore get the arm of their run.

Budget authority

  • The budget is the declaration run-cost budget <n> (or run-cost budget declared <n>) in the ## Stage 1 section of the root journal. The match ignores case.

  • The hook clamps the declaration to the value of its grade: simple-addition 6, TDD-led 12, architecture-led 30. A root journal with no grade has the budget 30, the hard maximum. The grade comes from the last line of Stage 1 that carries one, either a grade: line or a line with run-cost budget, and the last run-cost budget declaration wins, so a later Jev line changes the budget (it is not cached). An unparsable declaration gives the value of the grade.

  • Every other line is a report and never moves the budget. This holds for a HANDOFF line such as run-cost 20/60, a journal note, a line of a group journal, and a plain Run-cost: N.

  • Only the launcher raises the budget. The launcher is the main loop, with a prompt or a SendMessage to the agent id of an ft-developer instance. A sub-agent sends no raise: a captain’s Run-cost raise: or pre-authorized raise line is ignored, and the main loop is told so once per captain and lineage, through its notes queue. A name in to is refused. The accepted form is:

    Run-cost raise: <new total> · by <who>
  • The number is the new TOTAL, never the increment. The total has 1 to 4 digits. If the budget is 30 and the launcher authorises 24 more runs, the line is Run-cost raise: 54.

  • The hook records the total on the lineage root. A later reset, SPLIT or merge relaunch therefore keeps it. A total only increases. The hook never reads an n/m shape.

  • In a launch prompt the raise line counts only among the launcher lines BEFORE Original request: (no marker, no raise). A SendMessage raise is read from the whole message. The line must start its own line.

  • The line pre-authorized raise +K in the launch prompt of an instance adds K once for each root, also only before Original request:. K has 1 to 4 digits. A +K with 5 or more digits is ignored text. A SendMessage never carries it.

  • If the target ft-developer has not bound yet, the hook HOLDS the raise and applies it when the instance binds. The allowed SendMessage says so. A held raise expires if the instance returns before its first dispatch. Repeat the line in the relaunch head.

  • The same total sent again is harmless. The hook records it once and says nothing.

  • A denial prints the budget, the count, what is open, and the exact raise line that lifts it. For the merge instance, the line says "this diff has had no checkpoint F".

  • If the lineage has a recorded raise, the exhausted denial names it: "The budget N is max(declared D + pre-authorized P, raised total R) + 2 for the delta fix." The line also prints when only the delta extra applies, with no recorded raise. If the recorded raise is at or below declared plus pre-authorized, the denial adds "The recorded raise R is at or below N: it lifted nothing."

  • The count is every allowed dispatch plus every allowed relaunch, and the denial prints it as dispatches <d> + relaunches <r> (the runs and instances of lineage.json). The orchestrator’s own run-cost tally counts the same way: an instance launched Resumed from a reset or Resumed from a split adds 1 for its own launch. A first, fresh launch is not a relaunch.

  • Reviews are exactly verifier, ft-test-adversary and ft-architecture-audit. The hook counts them and never denies them.

Raise refusals and notes

A raise that cannot do anything is never silent. The hook answers in one of three ways.

Refused. A SendMessage to an agent is refused, not delivered, and nothing is written. The text ends with the corrected line. Send the message again whole. The reasons are:

Reason Meaning

No-op

The total is at or below the larger of the budget and the runs spent. The text names both numbers. If the launcher meant MORE runs, it gives the line with the new total: the larger of budget and spent, plus the number sent.

Unparsable

The line starts with Run-cost raise: and is not Run-cost raise: <new total> · by <who>. A total of 0, a total with 5 or more digits, an increment in prose, or a missing · by <who> is unparsable. A total has 1 to 4 digits and is at least 1. In a launcher head, the hook notes a total of 0 as malformed.

Not at line start

A list marker or emphasis stands before Run-cost raise:. Put the line at the start of its own line, with nothing before it.

Not a top-level ft-developer id

The to is a name, has no agent file in this session, is not an ft-developer, or is a slice child. For a slice child, the refusal names its immediate parent: send the raise to that parent, or to the lineage’s top instance. The raise lands on the root that the lineage of the instance it reaches resolves to. Known residual: the refusal names the parent also when that parent is a proxy (an agent an ft-developer launched, such as general-purpose) or a captain whose meta.json cannot be read. A raise sent to a proxy is refused in turn, so send it to the lineage’s top instance instead.

Launch not readable yet

The hook cannot read the launch of the target. Send the message again.

Only noted. A Run-cost raise: mention that does not start its line, such as mid-line text or a line quoted with >, is not read and is not refused. The allowed message carries a note. Send the line on its own line if you meant it.

Noted at the next call. Some raises are judged later: a held raise at bind, or a raise in a launch head. The hook queues a note for the main loop. The queue holds at most 16 notes for each session. The hook prints the queue at the next allowed Agent or SendMessage call of the main loop. It does not print it through the 60 s batch gate. If the queue dropped older notes, the hook says how many. A launch note is not a denial. The dispatch went out. The notes cover a head line that did not start its own line, a head line that is not the grammar, a head raise that changed nothing, and a held raise.

A relaunch the hook denies carries the unread-raise text. The text follows the fixed Do-now line of the denial and says that the relaunch is denied, so the line changed nothing.

Declared residuals.

  • The hook reads Run-cost raise: with that exact case and characters. A case or Unicode variant of the prefix is unread and gets no note.

  • A note can be lost. If a later hook denies the call after the hook has popped the queue, that call never shows the note. The exhausted denial then names the recorded raise.

Evidence

Every number on this page comes from a measurement. The record holds the method to rerun it, the session ids and the raw figures. It is deploy/evals/dispatch-economy-evidence.md. It covers the hook-payload probe, the replay of live self picks, the review re-check count, four sandbox compaction probes and the per-role context peaks. The running history is the dispatch-economy section of RESUME.prompt.md in the repository root.

This section holds the dated measurements behind the rules. Spend figures are notional list prices.

Review rounds and swaps

Each row is a dated measurement. The rules above state the current value.

Rule Measurement or date

Unit cap: Size: over 500 lines or 12 files

From 2026-10-28. Eight OSCORE units of 700-2000 lines ran their opus leaves to 361-518K tokens and cost $229 (evidence §72).

Re-checks use first-pass depth

On a live session, 78 of 150 verifier runs were re-checks. That is about 40% of review spend.

Round 1 runs the whole lens set

Classification of 88 checkpoint ledgers (deploy/evals/refuted-rounds-2026-10-16.md). A lens first run in round 3 brought 13 new objections and a round of its own.

A revision closes the class

ft-developer names the closure line itself from 2026-10-22. After round 1 the revision caused 38% of the objections at checkpoint D and 50% at F. 12-13% were the same objection only partly closed.

The gate list comes from grep

From 2026-10-22.

One pass, every finding

From 2026-10-17. The day before, half of 173 re-checks failed. 85 of the 88 failures were on NEW IDs. Severity was unstated in 66 of them. deploy/evals/round-watch.py measures the next window against that baseline.

tier_ab always sonnet

23 against 18 units: median cost $6.98 against $2.42, repaired 30% against 22%, none climbed.

tier_ab doubtful Jev opus (under 0.9)

15 against 15 units (evidence §49): median cost $11.89 against $5.46, raised a tier 7% against 20%, none climbed, and 47% of each arm left a DoD item unmet. 14 of 122 such picks since 2026-10-20.

orchestrator_ab past approval

A split on 2026-10-20 read 12 runs per arm: median $42.1 on opus against $8.2 on sonnet, DONE 1 against 4 (evidence §19).

orchestrator_ab descriptor over flags only

With bare flags, Jev kept 21 of 41 runs on opus because a protocol was named.

bugfix_ab keeps a MINOR with Jev opus under 0.9 on opus

A 50/50 split ran 2026-10-25 to 2026-10-27 (evidence §57). It closed on 2026-10-27 (§69): opus completed 7 of 7 tasks and sonnet 8 of 12, for about $25 a day less.

host_ab and repair_ab run on sonnet

Each ran as a 50/50 split until 2026-10-29, then closed (evidence §73). repair_ab: 28 against 39 units, median $7.83 against $2.01, climbed 4% against 8%, DoD unmet 11% against 18%. host_ab: 24 against 18 hosts, host median $13.7 against $4.5, bug tree median $65.6 against $46.9, no climb.

SendMessage exemption for general-purpose

From 2026-10-22.

ux_change

On 2026-10-29 one Mode: change unit touched 133 files and about 8000 lines, ran to 564K tokens of context and cost $80 (evidence §73).

Leaf not continued past 200K

One coder continued with seven repair batches had grown to 564K tokens and cost $43.

Bookkeeping by hooks

The bookkeeping was about a third of the orchestrators' Bash turns, each re-reading the whole context.

Context growth, resets and caches

Rule Measurement or date

Lane cap

On 2026-10-15 a main loop started fourteen lanes in two minutes. 34 dispatches were refused in the next hour, although the lanes' prompt held a six-lane rule.

Reset on 250K

A 250K cap would have cut orchestrator spend by 22% on 2026-10-16 and 2026-10-17.

Main loop handoff at 300K, step 50K

The step was 100K until 2026-10-31, when one main loop sat at a median of 274K with 40% of its turns over 300K. The hand-off note exists from 2026-10-23 (evidence §46).

Orchestrator context

One lane grew from 113K to 711K tokens of context during its design rounds.

One reset per instance, two per run

35 resets in 24 hours and batches of 7-8 instances at about $62 each on 2026-10-31. Boundary D exists from 2026-10-20. TDD-led resets at C, B and R exist from 2026-10-22. A resumed instance read a median 134K tokens at the first dispatch before the lean resume.

Boundary A holds at any context size

On 2026-10-24, 17 instances in 4 days had paid $73 on opus after their first unit (evidence §50).

Why 9 dispatches, and boundaries R and D

A fresh instance carried 142K tokens at its first dispatch, 253K at the 9th and 282K at the 12th. 370 dispatches went out at index 20 or later, most in checkpoint-F rounds that had no boundary. The three-round cap for checkpoint D came the same day.

One-hour cache

On 2026-10-14 cache expiries rewrote $185 of context (22%) in one session. The rewrites cost about $3.8 an hour after the change, against about $20 an hour before (RESUME.prompt.md). refactor-agent carries the cache since evidence §58.

ft-fix-host

Six general-purpose hosts had rewritten 200-370K contexts 27 times in 8 hours ($31). The owner set the rule on 2026-10-26 (evidence §65). The host runs on sonnet; the 50/50 split closed on 2026-10-29 (§73).

Compaction window 600K

The main loop reached 966K in a live session, and 94% of its spend re-read that context.

No unused tools in leaves

A probe on 2026-10-14 measured a first turn of 23.4K tokens with the full skill listing and 12.4K with disallowedTools: Skill (evidence §7). [source wanted: no file in the repository holds the two figures "23.3K to 9.7K tokens in a first turn" and "387 java-leaf runs had called Agent once and Skill never"]

Where the spend went

Window Measurement

2026-10-14, 9 hours

About $854. Orchestrators 38%, bugfix-agent 25%, lenses 18%, coding 7% (RESUME.prompt.md).

2026-10-16 19:30Z to 2026-10-17 12:59Z

Cache reads were 87% of orchestrator spend, at $0.16 a turn (evidence §15).

2026-10-16 to 2026-10-17, 20.5 hours

$2152. Orchestrators 33% ($709, median context 260K), verifiers 20%, Java coding leaves 18%, the main loop 7%, stack-neutral leaves 7%, bugfix-agent 6% (evidence §18).

2026-10-23

The main loop at about 540K paid about $0.27 a turn, 1305 turns and $253 in 24 hours. A fresh main loop at about 150K pays about $0.08 a turn (evidence §44).

2026-10-28 to 2026-10-29, 23 hours

$1351, 81% on opus. verifier $284, bugfix-agent $259, ft-developer $198, coding leaves $187, the main loop $138, ft-ui-ux-design $136 (evidence §73).

price-gate.py estimates the cost of a main-loop turn at $0.50 per million tokens of context, on opus.