This document is the canonical public reference for the pkg/productize/events envelope and the payloads under pkg/productize/events/kinds.
All event payload fields use their JSON tag names below. Fields tagged with omitempty are omitted when their value is empty or zero.
Every line in events.jsonl is one events.Event object:
| Field | Type | Description |
|---|---|---|
schema_version |
string |
Current schema version. The current public value is 1.0. |
run_id |
string |
Stable identifier for the workflow or exec run that emitted the event. |
seq |
uint64 |
Monotonic sequence number within a run. |
ts |
RFC3339 timestamp |
Event timestamp in UTC. |
kind |
string |
One of the 52 public event kinds below. |
payload |
object |
Kind-specific payload from pkg/productize/events/kinds. |
Payload type: kinds.RunQueuedPayload
mode: execution mode such asprd-tasks,pr-review, orexecname: workflow name when the run is workflow-backedworkspace_root: resolved workspace rootide: configured ACP runtime idmodel: effective model namereasoning_effort: effective reasoning levelaccess_mode: effective runtime access mode
Payload type: kinds.RunStartedPayload
modenameworkspace_rootidemodelreasoning_effortaccess_modeartifacts_dir: run artifact directory under~/.productize/runs/<run-id>jobs_total: number of prepared jobs
Payload type: kinds.RunCrashedPayload
artifacts_dirduration_mserrorresult_path
Payload type: kinds.RunCompletedPayload
artifacts_dirjobs_totaljobs_succeededjobs_failedjobs_canceledduration_msresult_path: path toresult.jsonsummary_message
Payload type: kinds.RunFailedPayload
artifacts_dirduration_mserrorresult_path
Payload type: kinds.RunCancelledPayload
reasonrequested_byduration_ms
Payload type: kinds.JobQueuedPayload
index: zero-based job index within the runcode_file: primary code file for a single-file jobcode_files: grouped code files for a batchissues: number of issue entries represented by the jobtask_title: parsed PRD task title when availabletask_type: parsed PRD task type when availablesafe_name: artifact-safe job nameout_log: stdout log patherr_log: stderr log path
Payload type: kinds.JobStartedPayload
indexattemptmax_attempts
Payload type: kinds.JobAttemptStartedPayload
indexattemptmax_attempts
Payload type: kinds.JobAttemptFinishedPayload
indexattemptmax_attemptsstatusexit_coderetryableerror
Payload type: kinds.JobRetryScheduledPayload
indexattemptmax_attemptsreason
Payload type: kinds.JobCompletedPayload
indexattemptmax_attemptsexit_codeduration_ms
Payload type: kinds.JobFailedPayload
indexattemptmax_attemptscode_fileexit_codeout_logerr_logerror
Payload type: kinds.JobCancelledPayload
indexattemptmax_attemptsreason
Payload type: kinds.SessionStartedPayload
indexacp_session_idagent_session_idresumed
Payload type: kinds.SessionUpdatePayload
indexupdate:kinds.SessionUpdate
kinds.SessionUpdate fields:
kind: semantic update variant such asagent_message_chunk,tool_call_started, orplan_updatedtool_call_idtool_call_state: one ofpending,in_progress,completed,failed,waiting_for_confirmationblocks: content blocks rendered to the userthought_blocks: internal thought blocks when the runtime exposes themplan_entries: plan rows withcontent,priority, andstatusavailable_commands: slash-command style actions withname,description, andargument_hintcurrent_mode_idusage:kinds.Usagestatus: session lifecycle status, typicallyrunning,completed, orfailed
blocks and thought_blocks are kinds.ContentBlock values. Their type field determines the JSON payload shape:
text:texttool_use:id,name,title,tool_name,input,raw_inputtool_result:tool_use_id,content,is_errordiff:file_path,diff,old_text,new_textterminal_output:command,output,exit_code,terminal_idimage:data,mime_type,uri
Payload type: kinds.SessionCompletedPayload
indexusage:kinds.Usage
Payload type: kinds.SessionFailedPayload
indexerrorusage:kinds.Usage
Payload type: kinds.ReusableAgentLifecyclePayload
stage: one ofresolved,prompt-assembled,mcp-merged,nested-started,nested-completed, ornested-blockedagent_name: resolved reusable-agent name for the stage being reportedagent_source: source scope such asworkspaceorglobalparent_agent_name: parent reusable agent when the stage refers to a nestedrun_agentcallavailable_agents: number of other reusable agents visible to the assembled discovery catalogsystem_prompt_bytes: byte size of the assembled reusable-agent system promptmcp_servers: ordered MCP server names attached to the ACP session after reserved-server mergeresumed: true when the reusable-agent lifecycle event belongs to a resumed ACP sessiontool_call_id: ACP tool-call id when the stage is tied torun_agentnested_depth: attempted child depth for nested executionmax_nested_depth: configured host-owned depth ceilingoutput_run_id: nested child run id when the child run was startedsuccess: nested child completion statusblocked: true when nested execution was blocked instead of runblocked_reason: one ofdepth-limit,cycle-detected,access-denied,invalid-agent, orinvalid-mcperror: structured diagnostic text for blocked or failed nested runs
Payload type: kinds.ToolCallStartedPayload
indextool_call_idnametitletool_nameinputraw_input
Payload type: kinds.ToolCallUpdatedPayload
indextool_call_idstateinputraw_input
Payload type: kinds.ToolCallFailedPayload
indextool_call_idstateerror
Payload type: kinds.UsageUpdatedPayload
indexusage:kinds.Usage
Payload type: kinds.UsageAggregatedPayload
usage:kinds.Usage
kinds.Usage fields:
input_tokensoutput_tokenstotal_tokenscache_readscache_writes
Payload type: kinds.TaskFileUpdatedPayload
tasks_dirtask_namefile_pathold_statusnew_status
Payload type: kinds.TaskFileSkippedPayload
Emitted when an agent session ends cleanly but does not produce any workspace changes. The task frontmatter is left at its prior status so the runner will redispatch the same task on the next invocation. See issue #144.
tasks_dirtask_namefile_pathpreserved_statusreason(currently alwaysno_workspace_changes)
Payload type: kinds.TaskMetadataRefreshedPayload
tasks_dircreated_atupdated_attotalcompletedpending
Payload type: kinds.TaskMemoryUpdatedPayload
workflowtask_filepathmodebytes_written
Payload type: kinds.TaskSchedulerUpdatedPayload
Emitted after each durable parallel-task scheduler checkpoint. The payload contains the manifest path, scheduler status, concurrency, starting and integration Git state, dependency waves, per-task run/branch/worktree/commit state, enforced verification command results and logs, finalization state, and sorted next actions.
Payload type: kinds.ArtifactUpdatedPayload
pathbytes_written
Payload type: kinds.ExtensionLoadedPayload
extensionsourceversionmanifest_path
Payload type: kinds.ExtensionReadyPayload
extensionsourceversionprotocol_versionaccepted_capabilitiessupported_hook_events
Payload type: kinds.ExtensionFailedPayload
extensionsourceversionphaseerror
Payload type: kinds.ExtensionEventPayload
extensionkindpayload
Payload type: kinds.ReviewStatusFinalizedPayload
reviews_dirissue_ids
Payload type: kinds.ReviewRoundRefreshedPayload
reviews_dirproviderprroundcreated_attotalresolvedunresolved
Payload type: kinds.ReviewIssueResolvedPayload
reviews_dirissue_idfile_pathproviderprprovider_refprovider_postedposted_at
Review-watch events are emitted by the daemon-owned parent run created by productize reviews watch. They are persisted
in the parent run journal, streamed through the regular run stream APIs, and use kinds.ReviewWatchPayload.
Payload type: kinds.ReviewWatchPayload
providerprworkflowrun_idhead_sharemotebranchdirtyunpushed_commits
Payload type: kinds.ReviewWatchPayload
providerprworkflowrun_idhead_shastatusreview_idreview_state
Payload type: kinds.ReviewWatchPayload
providerprworkflowroundrun_idhead_shatotalresolvedunresolved
Payload type: kinds.ReviewWatchPayload
providerprworkflowroundrun_idchild_run_idhead_sha
Payload type: kinds.ReviewWatchPayload
providerprworkflowroundrun_idchild_run_idhead_shastatuserror
Payload type: kinds.ReviewWatchPayload
providerprworkflowroundrun_idhead_sharemotebranch
Payload type: kinds.ReviewWatchPayload
providerprworkflowroundrun_idhead_sharemotebranch
Payload type: kinds.ReviewWatchPayload
providerprworkflowroundrun_idhead_sharemotebrancherror
Payload type: kinds.ReviewWatchPayload
providerprworkflowroundrun_idhead_shareview_idreview_statestatus
Payload type: kinds.ReviewWatchPayload
providerprworkflowroundrun_idhead_shastatus
Payload type: kinds.ProviderCallStartedPayload
call_idproviderendpointmethodprissue_count
Payload type: kinds.ProviderCallCompletedPayload
call_idproviderendpointmethodstatus_codeduration_mspayload_bytes
Payload type: kinds.ProviderCallFailedPayload
call_idproviderendpointmethodstatus_codeduration_mspayload_byteserror
Payload type: kinds.ShutdownRequestedPayload
sourcerequested_atdeadline_at
Payload type: kinds.ShutdownDrainingPayload
sourcerequested_atdeadline_at
Payload type: kinds.ShutdownTerminatedPayload
sourcerequested_atdeadline_atforced
Both the exec and workflow commands support real-time event streaming to stdout via the --format flag. When enabled, events are written as newline-delimited JSON (JSONL) to stdout.
| Flag value | Mode | Description |
|---|---|---|
text |
default | Human-readable text output. No event streaming. |
json |
lean | Emits a filtered subset of high-signal events as compact JSONL objects. |
raw-json |
raw | Emits every bus event as its full events.Event envelope. |
Lean mode streams only lifecycle and interactive events to keep output concise for CI pipelines and automation:
Included event kinds:
run.started,run.completed,run.failed,run.cancelledjob.started,job.retry_scheduled,job.completed,job.failed,job.cancelledsession.started,session.completed,session.failedsession.update— only when the update kind isuser_message_chunk,agent_message_chunk,tool_call_started, ortool_call_updated
Lean JSONL shape:
{"type":"run.started","run_id":"abc123","seq":1,"time":"2026-04-13T10:00:00Z","payload":{...}}| Field | Type | Description |
|---|---|---|
type |
string |
Event kind |
run_id |
string |
Run identifier |
seq |
uint64 |
Monotonic sequence number |
time |
RFC3339 |
Event timestamp |
payload |
object |
Kind-specific payload |
Raw mode streams the full events.Event envelope for every bus event, including internal events not shown in lean mode. The shape matches the envelope documented in the Envelope section above.
# Stream lean events for a single-prompt exec run
productize exec --format json "Refactor the auth middleware"
# Stream all raw events for a daemon-backed review-fix workflow
productize reviews fix my-feature --format raw-json
# Pipe lean events to jq for filtering
productize exec --format json "Fix the tests" | jq 'select(.type == "session.update")'The streamer waits for a terminal event (run.completed, run.failed, or run.cancelled) before finalizing. If no terminal event arrives within 5 seconds after the bus closes, the streamer exits gracefully.