← Back to list
01Issue
FeatureShippedSwamp CLIPublic
Assigneesskunk-ape
Relationships
#4949 stagecraft: a dispatch's product write records its usage, usage stays complete across subagents, and onBehalfOf is recorded consistently
Opened by skunk-ape · 11/20/2026· Shipped 11/20/2026
Problem
Recording a dispatch's outcome takes two writes, and the usage half is easy to get wrong.
In factory sessions from Nov 4–18 (the cue and swamp-extensions factories):
- Two calls per dispatch. Drivers made 31 separate
record_usagecalls beside the product writes for the same dispatches. Each is another command, another status print and another chance to forget. - One usage record per dispatch, at any moment. A dispatch that ran several subagents keeps whichever usage was recorded first. If the driver records before every subagent has finished, or records an estimate, the dispatch keeps a partial or estimated figure for good, and metrics and the summary report it as final.
onBehalfOfis stored verbatim. Approvals carried both "seth" and "Seth" for the same person, and two early approvals carried none. The journal and metrics then count one person as two. #4936 added a docs rule; the engine still accepts anything.
What to change
- A product write can carry its dispatch's usage.
record_artifactandrecord_evidencefor a dispatch accept the dispatch's usage, so recording the product and its cost is one write.record_usagestays for work that records no product. - Usage stays complete across subagents. Usage can be recorded per subagent and added up for the dispatch, or a dispatch can take a later, complete record in place of an earlier partial one. The plan picks the model. Metrics and the summary distinguish complete usage from partial or estimated usage, and never present a partial figure as final.
onBehalfOfis recorded consistently. The engine normalises the handle (at least case and surrounding space) so one person is one actor in the journal and metrics. It says clearly when a write that needs a person has none. Existing journal entries are read as-is; the plan says how metrics treat old mixed-case entries.
Done when
- A dispatch's product and usage go in one write, and the skill's driving loop uses it.
- A dispatch with several subagents ends with complete usage, or is marked partial; tests cover recording before and after every subagent finishes.
onBehalfOfspelled two ways counts as one actor; a missing one is reported.- Run records written before this change still read, and the summary and metrics still render them.
- The skill, driving reference, REFERENCE and a DESIGN decision entry describe it.
Out of scope
Short write output (#4907), publishing (#4916), and studio changes beyond what's needed to show partial usage, if anything.
02Bog Flow
Shipped
Click a lifecycle step above to view its details.
03Sludge Pulse
Sign in to post a ripple.