Refs are against master 62bf58c0c. The same loss happens on v0.42.6 on a live host.
Observed
On a host where one project holds MODULE authority, every module-served classify-memories run lands in subagent_invocations as completed with input 0, output 0, and no model. The runner module's own run index records real spend for the same run: 14,039 in and 6,125 out on antigravity-gemini-3.8-flash (2026-09-24 06:00:47Z). Host-side cost and usage reporting therefore never sees module-served classify spend. This is the same symptom as the Pi historian lane in #435, on a different lane.
Both halves drop it
Module: the dreamer.run_task response (crates/mc-module/src/lib.rs:11519-11533) carries diagnostics.model, attempts and child_session_id, but no usage. The producer's usage never enters the response.
Host: runClassifyChunk takes the module route and records only a status (packages/plugin/src/features/magic-context/dreamer/classify.ts:349-352):
if (moduleRoute) {
const run = await runClassifyThroughModule(args, chunk, anchors, signal);
recordInvocation(args, startedAt, { status: "completed" });
return run;
recordInvocation fills tokens and provider/model only from a completion (:682-686), and none is passed here. So even the model the module does return (diagnostics.model) is discarded.
Suggested shape
Have the module include the producer's usage in the dreamer.run_task response, then have the host map diagnostics.model and that usage into recordInvocation on the module route. The historian's module lane likely has the same gap, but I only verified classify.
Refs are against master
62bf58c0c. The same loss happens on v0.42.6 on a live host.Observed
On a host where one project holds MODULE authority, every module-served
classify-memoriesrun lands insubagent_invocationsascompletedwith input 0, output 0, and no model. The runner module's own run index records real spend for the same run: 14,039 in and 6,125 out onantigravity-gemini-3.8-flash(2026-09-24 06:00:47Z). Host-side cost and usage reporting therefore never sees module-served classify spend. This is the same symptom as the Pi historian lane in #435, on a different lane.Both halves drop it
Module: the
dreamer.run_taskresponse (crates/mc-module/src/lib.rs:11519-11533) carriesdiagnostics.model,attemptsandchild_session_id, but no usage. The producer's usage never enters the response.Host:
runClassifyChunktakes the module route and records only a status (packages/plugin/src/features/magic-context/dreamer/classify.ts:349-352):recordInvocationfills tokens and provider/model only from acompletion(:682-686), and none is passed here. So even the model the module does return (diagnostics.model) is discarded.Suggested shape
Have the module include the producer's usage in the
dreamer.run_taskresponse, then have the host mapdiagnostics.modeland that usage intorecordInvocationon the module route. The historian's module lane likely has the same gap, but I only verified classify.