downshift report: routed spawns

Downshift by Tiago Vilas Boas. Updated . Source on GitHub

Historical snapshot: The page header says it was updated on 3 November 2026; some sections cite different dates. Details may have changed. Check the linked source on GitHub and the current harness matrix before relying on compatibility claims.

downshift stats estimates savings against a counterfactual baseline. downshift report measures what routed spawns used. Every spawn is routed, so the report states what the routed spawns did per completed task and where they were redone.

downshift report              # last 30 days
downshift report --days=7
downshift report --json       # same numbers, machine-readable

Reading the log is all it does. Nothing is written, and nothing in it is a prompt, a task or a path: counts, rates and token counts. Neither the text nor the JSON report prints a dollar figure.

Billable tokens per completed task need to see a child end. The report ends with a "Completion measurable, by harness" section: a harness is measurable once it declares an end event and at least one end record (a usage record, or a child_ended that is not a launch) is in the window. Harnesses whose end event is unverified or unknown say so instead of printing zeros. See harness-matrix.md.

Which spawns count

Every spawn is routed. The one way to leave spawns unrouted is the per-session pause (downshift session --pause, or /downshift:status --pause), an explicit command you give. A paused spawn is classified and logged with outcome: baseline, and the report counts it as excluded. Log lines written by older versions with outcome: baseline (their control group or no-route switch) still load and are excluded the same way. The report prints how many it left out.

What is counted

For each spawn the report joins the routing decision, the usage record with tokens and how the child ended (the same events stats reads).

  • Routed spawns: every spawn the router was allowed to decide on, including those it left unchanged. Counting by intent keeps the result honest: holds and guardrails count.
  • Completed task: a child that ended completed and has a usage record with tokens. Launched, stopped, unknown and children without tokens are not counted.
  • Rework: a respawn in the same session within 10 minutes after a child ended in error or was interrupted (the same rule as session and stats). The failed child counts as reworked.
  • Billable tokens per completed task = the input, output and cache write tokens of the same tasks over the number of completed tasks. Cache reads are left out: they follow the size of the context a child rereads, not the tier it ran on, and in real sessions they are most of the total, so counting them hides the difference a tier makes. A failed attempt that a completed task redid is counted with that task. Failed work that never got a successful redo is not added to anyone.
  • Effect = the share of the routed spawns' billable tokens that ran on a tier lower than the one requested after Downshift applied a rewrite. A routed child with verdict OK and no rewrite that still ran lower is not counted; the report names that amount apart, and --json carries it as effect.billable_tokens_without_rewrite.
  • Rework rate = reworked spawns divided by spawns with an observed end (completed, error or interrupted).

What the text report prints

The report opens with COMPACTION SAVINGS PER HARNESS, in tokens only, per harness and never summed (the Compactor runs on every harness and OS with no model-rewrite channel, so it leads). After it, when the window has more than one harness, the text report shows the current harness (the harness of the latest event in the window): the full routed table and the plan lens. Other harnesses follow, one block each, in name order, with the same table and the plan-lens line. A window with a single harness keeps the original report, with no extra headings. --json keeps the window-wide totals and adds current_harness, by_harness (current first) and compaction_by_harness.

The routed table shows tokens only. It has one routed row:

Column Meaning
spawns Routed decisions in the window.
ended Spawns with an observed end: completed, error or interrupted.
completed Completed tasks.
billable/completed Billable tokens per completed task (see above). - when there is no completed task.
rework Rework rate.

The effect follows the table whenever the routed spawns have billable tokens. A window with no routed spawn prints No routed spawn in this window.

Under the table, rework by routing verdict gives one row per verdict (kept, profile, rule, hint_down, class, class_up, default, guard_floor, held_unknown, refused_config, held_after_failure, not_recorded) with its spawns, ended spawns, completed tasks and rework rate. Each row names the policy key that turns that verdict off, or says that no key does. A verdict is flagged once it has 20 completed tasks; you read the rework rate and decide. The report never changes the policy.

When decisions in the window carry a permission mode, the text report also prints Decisions by permission mode, with a count per recorded label. Claude Code supplies this field; the count is descriptive and does not change routing.

The plan lens follows, labelled Plan lens (tokens only). It is for plans with no per-token bill (Claude Code Pro, Max, Team; Cursor plans), and shows:

  • Lower tier: tokens that ran on a lower tier than the one requested in the window, shown as N% of work · N% of cache on a lower tier. Work (input+output) and cache (read+write) are counted apart. A lower tier is not fewer tokens: the report has no baseline to say whether routing used fewer, so read billable tokens per completed task and rework next to it.

The text report ends with one line, Tokens saved (estimate): N: the tokens the Compactor kept out of the context in the window (saved bytes / 4, an estimate). Tokens that ran on a lower tier are not in it: they were spent, and the effect and the billable tokens per completed task above are where routing is read. --json keeps the parts (tokens_saved, compactor_saved_bytes, compactor_tokens_estimate) and adds tokens_saved_estimate.

downshift stats and every live view (session tree, panel, statusline, watch) show tokens only.

The JSON report

Report format update: This section describes the historical output. The current report guide documents routing-token fields in place of the earlier effect and tokens_saved fields and specifies schema 4 for downshift stats --export.

--json includes counts and rates, plus token figures: tokens by class (input, output, cache_read, cache_write, total, records) for the routed spawns, billable_tokens_per_completed_task, tokens_per_completed_task (cache reads included, for reference), effect (billable_tokens, billable_tokens_lower_tier, share), tokens_saved and the completion status per harness. When permission-mode data exists, it also includes the optional decisions_by_permission_mode map. Only built-in Claude Code mode names are stored (default, acceptEdits, bypassPermissions, plan, auto, dontAsk); an unrecognized value is recorded as other, and a missing value is omitted. The report has no dollar key. excluded_unrouted counts the paused spawns and the old baseline lines left out. rework_by_verdict carries the verdict rows, each with reworked_correlation_ids: the correlation_id of every decision of that verdict that was followed by rework. downshift stats --export has no dollar key either (schema 3; see stats-export.md).

Limits

  • The report counts tokens and prices none of them. No dollar figure is printed, and no invoice is implied.
  • Tasks differ in size and nothing here is randomly assigned, so the report shows what routed spawns used, not what they would have used on the requested model. Read the rework rate and the counts, not only the per-task figure.
  • A harness that does not report usage or child ends contributes spawns but no completed tasks.
  • Rework needs a session id; spawns without one are never linked.
  • An end without a tool-call id links by session only to an applied rewrite, so an unchanged routed spawn on such a harness has no end.
  • Before 2026-10-19 a Cursor spawn could also be logged as a claude-code decision (Cursor runs the Claude Code hooks); those copies never end, so they inflate the routed spawn count of older windows. Current versions leave the copy to the cursor hook and record nothing.

See stats-export.md for the counters stats --export adds around this.

More docs