Workflow journal.jsonl result lines carry no agent label — post-hoc joining of results to workflow stages is impossible

Open 💬 0 comments Opened Jul 10, 2026 by anombyte93

Observed

Each {"type":"result"} line in a Workflow run's journal.jsonl has keys {type, key, agentId, result} where key is a content hash (e.g. v2:b672316a…). The label passed to agent(prompt, {label}) is not recorded on either the started or result lines.

Practical failure: a review workflow fanned out finder agents and per-candidate verifier agents (label: "verify:<file>:<line>"). When the workflow's return value was truncated in the completion notification, reconstructing which verdict belonged to which candidate from the journal was impossible — verdict results carry no label, and hash keys don't map to anything human-usable. The diagnostics pointer ("Read journal.jsonl — one result line per completed agent") undersells this: you can read the results but not attribute them.

Expected

started/result journal lines should carry the agent's label (and ideally phase), making the journal self-describing for exactly the post-hoc analysis the docs recommend it for.

Version

claude-code 2.1.206, linux.

Workaround

Have every workflow agent echo its own label/candidate inside its structured output schema (self-identifying payloads), or parse the task .output status dump which does carry label + agentId pairs and join on agentId.

Suggested fix

Include label (and phase) in the journal writer alongside agentId on both started and result lines.

View original on GitHub ↗