pub struct Report {
pub schema_version: u32,
pub status: Status,
pub harness: String,
pub api_schema: String,
pub final_message: Option<String>,
pub structured_output: Option<Value>,
pub turns: u32,
pub tool_calls: Vec<ToolCallRecord>,
pub usage: Usage,
pub session_id: String,
pub stop_reason: Option<String>,
pub error: Option<String>,
}Expand description
The single JSON document locode-exec prints to stdout (ADR-0009).
schema_version is frozen at 1; changing the envelope shape is a deliberate,
versioned change (see the golden test).
Fields§
§schema_version: u32Envelope schema version. Always 1 for this contract.
status: StatusThe terminal state of the run.
harness: StringThe harness pack the run used (e.g. grok).
api_schema: StringThe wire schema the run used (e.g. anthropic) — the provider’s api_schema().
Names the request/response protocol shape, not a gateway/endpoint.
final_message: Option<String>The assistant’s final text message, if the run completed with one.
structured_output: Option<Value>A schema-constrained task answer, if one was requested (--json-schema).
turns: u32How many sample→dispatch→append turns the loop ran.
tool_calls: Vec<ToolCallRecord>A record of every tool call made during the run.
usage: UsageToken accounting for the run.
session_id: StringThe session identifier.
stop_reason: Option<String>The final model stop reason ("end_turn", "max_tokens", …), when a
completion was received (ADR-0009 amendment 2026-07-19): lets an eval
pipeline distinguish “model finished” from “model got truncated”
without re-reading the trace.
error: Option<String>A fatal error message, if the run ended in status == error/model_error.