Output Schema
Every successful inspection emits one agent_session_facts.report JSON object for one logical Agent Session. This is the stable machine-readable contract for scripts and other consumers. The report has two independently versioned views:
uniformcontains facts with the same meaning across Codex, Pi, and Claude Code.runtime_specificpreserves native topology and accounting details that cannot be normalized without losing meaning.
Terms used below:
- A Session is one logical, runtime-owned Agent context, even when its evidence spans several files.
- A Loop is one outer execution cycle inside that Session, such as a user request followed by Agent work and an ending boundary.
- An Item is a counted program fact. The current uniform schema exposes tool calls as Items.
- A Source is one physical JSONL file read to produce the report. JSONL means one JSON record per line.
Envelope
complete: false is not a command failure. It means the supplied files were readable and the report contains every safely known fact, but at least one coverage, lifecycle, usage, or source-integrity gap remains.
Uniform Session
Source coverage
Source coverage can be complete while the overall report is incomplete—for example, when every file was supplied but a Loop is still open or a usage record is missing.
Loop outcomes
The outcome counts sum to total.
Usage
Usage uses inclusive totals: the more specific counters below are already contained in their parent total.
When both cache fields are known:
For example, input: 1000, cached: 600, and cache_write: 200 means:
- 600 input tokens were read from an existing cache.
- 200 input tokens were written to cache for future requests.
- 200 input tokens were ordinary uncached input.
- Total input remains 1000. Do not calculate
input + cached + cache_write.
The same rule applies to output: reasoning is already included in output. For example, output: 100 and reasoning: 40 still means 100 total output tokens, not 140.
Total model tokens are derived as input + output; no redundant total is stored. Every uniform field is always serialized. Nullable usage fields use null when the adapter cannot establish a value from the supported artifacts; null is unknown, while 0 means the adapter established that the count was zero.
status is:
available: complete values are invalues;known_valuesisnull.partial: safely known values are inknown_values;valuesisnull.unavailable: both value fields arenull.
known_values is the subtotal supported by the records that did expose usage. It is safe to treat it as known evidence, but not as the complete Session total.
Tool calls
Model cost
The tool never calculates cost from a pricing table. Pi can expose runtime-recorded cost; Codex and Claude Code currently report it as unavailable because their supported Session artifacts do not record it.
Sources
Each source fixes the inspected physical snapshot:
Runtime-specific facts
Runtime-specific fields are intentionally not forced into one common body:
Follow the runtime_specific.schema identifier before interpreting facts. New incompatible uniform meanings require agent_session_facts.uniform@2; incompatible CLI contracts require an appropriate crate version change.