Skip to content

Event Format Reference ​

Wave emits structured NDJSON (Newline-Delimited JSON) events to stdout on every state transition during pipeline execution. Events are both human-readable in the terminal and machine-parseable for CI/CD integration.

Event Schema ​

Every event contains these fields:

FieldTypeAlways PresentDescription
timestampstringyesISO 8601 timestamp with timezone.
pipeline_idstringyesUUID for this pipeline execution instance.
step_idstringnoStep identifier within the pipeline.
statestringyesEvent state (see Event States below).
duration_msint64noMilliseconds elapsed since step started.
messagestringnoHuman-readable status message.
personastringnoPersona executing the step.
artifacts[]stringwhen completedList of output artifact paths.
tokens_usedintwhen completedTotal token count for the step.
tokens_inintwhen completedInput token count.
tokens_outintwhen completedOutput token count.
progressintnoPercentage progress (0-100).
current_actionstringnoCurrent action description.
total_stepsintwhen startedTotal pipeline steps.
completed_stepsintnoNumber of completed steps.
estimated_time_msint64yes (0 = no estimate)Estimated remaining time in milliseconds.
validation_phasestringnoCurrent contract validation phase.
compaction_statsstringnoRelay compaction statistics.
failure_reasonstringwhen failedDetailed failure reason.
remediationstringwhen failedSuggested fix for the failure.
tool_namestringnoTool being used (for stream_activity events).
tool_targetstringnoTool target path or argument.
modelstringnoLLM model used for the step.
adapterstringnoAdapter used (e.g., "claude").
temperaturefloatnoTemperature setting used.
recovery_hints[]objectwhen failedRecovery hint suggestions.
outcomesobjectwhen completedStep outcome summary.

Event States ​

StateDescription
startedPipeline or step has begun execution.
runningStep is actively executing.
completedStep or pipeline finished successfully.
failedStep or pipeline failed.
retryingStep is being retried after validation failure.
step_progressProgress update within a running step.
eta_updatedEstimated time of completion updated.
contract_validatingContract validation is in progress.
compaction_progressRelay compaction is in progress.
stream_activityReal-time tool activity from the adapter.
skippedStep was skipped (condition not met or dependency failed).

Event Examples ​

Pipeline Start ​

json
{"timestamp":"2026-02-01T10:00:00.500Z","pipeline_id":"a1b2c3d4","step_id":"navigate","state":"started","message":"Starting navigator persona","persona":"navigator"}

Step Completed ​

json
{"timestamp":"2026-02-01T10:01:30.000Z","pipeline_id":"a1b2c3d4","step_id":"navigate","state":"completed","duration_ms":90000,"message":"Navigation complete","persona":"navigator","artifacts":["output/analysis.json"],"tokens_used":3200}

Step Failed ​

json
{"timestamp":"2026-02-01T10:08:00.000Z","pipeline_id":"a1b2c3d4","step_id":"implement","state":"failed","duration_ms":480000,"message":"Step failed after 3 retries","persona":"craftsman"}

Output Modes ​

JSON (default) ​

One JSON object per line. Machine-parseable.

bash
wave run flow "task" 2>/dev/null

Text ​

Human-friendly format with color and formatting.

bash
wave run flow "task" -o text

Text output example:

[10:00:01] → navigate (navigator)
[10:00:01]   navigate: Executing agent
[10:01:30] ✓ navigate completed (89.0s, 3.2k tokens)
[10:01:31] → specify (philosopher)
[10:01:31]   specify: Executing agent

Consuming Events ​

Pipe to jq ​

bash
wave run flow "task" | jq 'select(.state == "failed")'

CI Integration ​

bash
# Exit code reflects pipeline status
wave run flow "task" > events.jsonl
EXIT_CODE=$?

# Parse events for reporting
cat events.jsonl | jq -r 'select(.state == "completed") | "\(.step_id): \(.duration_ms)ms"'

Real-time Monitoring ​

bash
wave run flow "task" | while IFS= read -r event; do
  state=$(echo "$event" | jq -r '.state')
  step=$(echo "$event" | jq -r '.step_id')
  echo "Step $step is now $state"
done

Event Ordering Guarantees ​

  1. Each step emits a started event before work begins.
  2. completed and failed are terminal — no further events for that step.
  3. Events within a step are strictly ordered by timestamp.

Released under the MIT License.