Observability
Stream run events
Read Dive's progress as JSON events on stderr, for scripts, dashboards and CI annotations.
Set DIVE_EVENTS=jsonl and Dive writes its progress to stderr as one JSON object per line, instead of text for people. stdout still carries only the result, so you can read both from one run:
DIVE_EVENTS=jsonl dive plan run weekly_changes \
--input base=v0.21.0 2> events.jsonlThe stream covers dive plan run, dive ask and dive chat. Every event has an event field naming its type.
{
"event": "tool_started",
"tool": "github__tool__git_log",
"args": {
"base": "v0.21.0",
"head": "HEAD"
}
}
{
"event": "tool_finished",
"tool": "github__tool__git_log",
"ms": 41,
"is_error": false
}
{
"event": "synthesizing"
}
{
"event": "model_call",
"kind": "chat",
"site": "solver",
"model": "claude-sonnet-5-5",
"input_tokens": 2140,
"output_tokens": 388,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"ms": 5210
}
{
"event": "usage_summary",
"usage": {
"calls": 1,
"input_tokens": 2140,
"output_tokens": 388,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"by_step": [],
"by_model": [
{
"provider": "anthropic",
"model": "claude-sonnet-5-5",
"calls": 1,
"input_tokens": 2140,
"output_tokens": 388,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
]
}
}Events
tool_started
A tool call began.
The tool's full name, such as github__tool__git_log.
The input the tool was called with, after templates were filled.
tool_finished
A tool call ended.
The tool's full name.
How long the call took, in milliseconds.
Whether the tool returned an error.
agent_round
An agent, or an agent step, started another round of model calls and tool calls.
The round number.
synthesizing
A plan's solver started writing its answer.
model_call
A model call finished.
chat for a chat model, decision for a decision model.
Where the call was made: the step's path, such as E3 or triage/E1, or the model role when the call belongs to no step.
The model id.
Uncached input tokens.
Output tokens.
Input tokens written to the provider's prompt cache.
Input tokens read from the provider's prompt cache.
How long the call took, in milliseconds.
usage_summary
What the whole run spent, sent once at the end, including when the run fails. Dive skips it when the run made no model calls.
Model calls in the run.
Total uncached input tokens. output_tokens, cache_creation_input_tokens and cache_read_input_tokens sit alongside it.
Total cost in USD. Present only when pricing covers a model the run used.
The same totals per step, each with its path.
The same totals per model, each with its provider and model.
Related environment variables
How Dive reports progress and failures on stderr. Unset, stderr is for people.
| Value | Effect |
|---|---|
jsonl | stderr becomes a stream of JSON events, one per line. ask steps can't prompt anyone, so they use their whenUnanswered setting. |
github | A failing dive plan run also prints a ::error:: annotation to stdout, which GitHub Actions shows on the run. |