fix(gatorwalk-factory): record_usage takes the token total a harness reports (swamp-club #2778) #393
Loading…
Reference in a new issue
No description provided.
Delete branch "cue/2778-gatorwalk-factory-record"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes swamp-club #2778.
Claude Code reports one
subagent_tokenstotal per subagent, with no input/output split, sorecord_usage(which required both halves) could not take it: the cue trial ended with every dispatch "without usage".Engine
totalTokens, orinputTokensandoutputTokenstogether, or all three;toolUsesanddurationMsare optional. The total is not checked against the split (a harness total can count cache tokens). Half a split, or no tokens, is refused with a reason. All run-record changes are optional fields, so existing records stay valid.totalTokens, else input + output), keep the split over the dispatches that gave one, sum tool uses and duration, and count dispatches without usage by mode (older dispatches fall back to the pinned definition's stage mode).Skill (usage sections only)
<usage>block, or the Agent tool result when synchronous), never from the subagent; don't ask reviewers for tokens; interactive dispatches normally have none.totalTokens, andskill_test.tschecks that the attested total equals the sum of the example's reported counts.Verification: verify-build
e0a185d6and verify-reviews5ac1d7a3on91e7b3c5, all steps passed (2 guarded skips); both reviews pass with low findings only (per-model split has no per-model split count; new optional fields are not readable by an older strict engine; an empty coerced token input becomes 0). Attestationd1f623ce.🤖 Generated with Claude Code