Skip to content
Edit this page

CLI capture matrix

agent-trace can only report events exposed by a provider's hook surface, or recorded in the checkpoint it reads. This matrix keeps those boundaries explicit instead of treating every adapter as equivalent.

The machine-readable source is src/agent_trace/capture_matrix.json. It ships inside the package so agent-strace health can read the same entries this page describes. An entry marked unverified is documentation of the current adapter contract, not proof that a specific provider release was exercised in a clean environment. An entry marked verified names the provider release that was exercised; other releases may behave differently.

Verify one local capture

After recording one local Claude Code or Codex session, run:

agent-strace setup --cli claude --verify --live
agent-strace setup --cli codex --verify --live

The command first verifies the provider config and agent-trace executable. It then selects the newest matching recorded session, or the session passed with --session SESSION_ID, and applies this packaged matrix through the same evidence-health assessment used by agent-strace health. Its known-gap list comes directly from the selected provider entry. The verifier does not infer a gap from a missing event and does not start a provider or model request.

Local live verification and matrix verification_status answer different questions. Live verification proves that this installation recorded one reviewable session. Matrix status records whether the repository contains a versioned, reproducible provider fixture for the adapter contract.

Provider Setup Session Prompt/response Tools File/command/error Verification
Claude Code agent-strace setup --cli claude start + end captured captured provider-defined; errors captured verified, 2.1.325
OpenAI Codex agent-strace setup --cli codex start + end captured captured provider-defined verified, 0.167.0-alpha.3.2
GitHub Copilot CLI agent-strace setup --cli copilot start + end, first prompt can arrive before start prompt only captured provider-defined; errors captured verified, 1.0.107
GitHub Copilot cloud agent agent-strace setup --cli copilot-cloud partial: start + end per job, only when streamed to a collector prompt only captured provider-defined; errors captured unverified
OpenCode agent-strace setup --cli opencode partial: start + end per run captured captured provider-defined; errors captured unverified
Entire checkpoints none: read by agent-strace review --entire and import --entire written by agent-strace, not recorded captured, from the compact transcript captured provider-defined unverified

Claude Code

  • Config: ~/.claude/settings.json
  • Setup only prints Claude hook JSON: manually copy or merge the generated hooks into ~/.claude/settings.json; it does not write the file.
  • Rollback: remove only the agent-trace command hooks you manually merged into that file, retaining unrelated hooks.
  • Privacy: captured fields still pass through agent-trace redaction, but agent-trace cannot expose fields Claude Code never emits.
  • Coverage: session start and end, user prompts, the final response (Stop, recorded as an assistant_response with last_assistant_message as its text), tool calls and results paired by tool_use_id, and failed tools (PostToolUseFailure, recorded as error events). Setup registers 7 hooks: SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, Stop and SessionEnd.
  • Verified with Claude Code 2.1.325 on 2026-11-19 through agent-strace setup --cli claude: five claude -p runs (a plain prompt; a read, a shell command and an edit; a read of a missing file and a shell command that exits 1; a write denied at the permission prompt; a general-purpose subagent that ran a shell command). Each run used a throwaway workspace, a temporary AGENT_TRACE_DIR, --setting-sources project,local with the generated hooks passed through --settings, so no user-level hooks ran, and one --allowedTools grant per needed call (Bash(wc -l notes.txt), Edit(./notes.txt), Bash(ls missing.txt)) with no permission-bypass flags. A recorder-only hook logged the raw payloads of the other hook events. A run against 2.1.222 on 2026-11-09 was not performed because no credentials were available; 2.1.325 is the first verified release.
  • Event order: SessionStart (source startup), UserPromptSubmit, the tool hooks, Stop, then SessionEnd (reason other in every claude -p run). PreToolUse and PostToolUse carry tool_use_id, and each result pairs with its call by that ID. Every hook that agent-strace needs fired in -p mode.
  • Failed tools: a read of a missing file and a shell command that exits 1 both fire PostToolUseFailure with the failure text in a top-level error field (for the shell command it starts with Exit code 1, followed by the command's error output), is_interrupt and duration_ms, and no tool_response or separate exit code. Each becomes an error event paired with its call and counted in the session's errors, with the error text, cut to 500 characters, as its text. is_interrupt and duration_ms are not recorded; the event's duration is measured from its PreToolUse.
  • Tool results: PostToolUse sends tool_response as an object, for example {"type": "text", "file": {...}} for a read and {"stdout": ..., "stderr": ..., "interrupted": ..., "isImage": ..., "noOutputExpected": ...} for a shell command. The result stores it as compact JSON, cut to 1000 characters; see hook.
  • Subagents: a subagent is not a separate session. Its hooks arrive under the parent session_id with agent_id and agent_type. Its tool calls are recorded in the parent trace with those two fields, between the parent's Agent tool call and result; the parent's own tool events carry neither. SubagentStart and SubagentStop fire but are not registered, so no subagent_start or subagent_stop events are recorded. SubagentStop carries agent_transcript_path and last_assistant_message.
  • Hooks setup does not register: recorder-only hooks in the verification runs showed:
  • PostToolBatch fired after each batch of tool calls, with a tool_calls list.
  • MessageDisplay fired before every Stop with the response text in delta.
  • PermissionRequest fired for the denied write, with permission_suggestions.
  • SubagentStart and SubagentStop fired around the subagent.
  • None of the other hook events the recorder registered fired, including Notification, PermissionDenied, StopFailure and the compaction hooks. WorktreeCreate, WorktreeRemove and FileChanged were not recorded.
  • Known gaps:
  • PostToolUseFailure has no separate exit code; a shell command's exit code is only in the recorded error text. is_interrupt is not recorded, so an error event does not say whether the user interrupted the call (no call was interrupted in the verification runs).
  • SessionStart carries no model name and no hook reports token usage, so session_start has an empty model and sessions record no tokens.
  • SubagentStart and SubagentStop are not registered, so a subagent is visible only through the agent_id and agent_type on its tool events.
  • A tool denied at the permission prompt (in claude -p, any call without an --allowedTools grant) fires PreToolUse and PermissionRequest but no post hook, so its tool_call has no result or error, and health reports unpaired_tool_call.
  • File and command activity is visible only in tool arguments and results (tool_input.command for Bash, tool_input.file_path for Read, Edit and Write); no file_write events are recorded.
  • Local verification: accept workspace trust, record one small session, exit it cleanly, then run agent-strace setup --cli claude --verify --live.

OpenAI Codex

  • Config: $CODEX_HOME/hooks.json (default ~/.codex/hooks.json)
  • Backup: before overwriting an existing config, setup preserves its original bytes once at hooks.json.agent-strace.bak in the same directory. Repeated setup runs do not overwrite that pre-agent-trace snapshot.
  • Rollback: run cp ~/.codex/hooks.json.agent-strace.bak ~/.codex/hooks.json, replacing ~/.codex with "$CODEX_HOME" when it is set. If no config existed before setup, no backup is created; remove the generated hooks.json instead.
  • Coverage: session start and end, user prompts, assistant responses, PreToolUse/PostToolUse tool activity, Stop (recorded as a stop event), SubagentStart/SubagentStop (recorded as subagent_start/subagent_stop events in the parent trace) and PostModelRequest (one llm_response event with token usage per model request).
  • Verified with codex-cli 0.167.0-alpha.3.2 on 2026-11-09: a tool call, a failing shell command and a spawned subagent, each through SessionEnd. codex-cli 0.163.0-alpha.11 was verified on 2026-10-22 and 2026-10-24; that recording is kept as a legacy fixture. Each run used codex exec in a throwaway workspace, an isolated CODEX_HOME, a read-only sandbox and no approval-bypass flags, with the hooks trusted beforehand. The standalone codex-cli 0.143.0 available on the same machine could not complete a turn, so it was not verified.
  • Hook trust: Codex runs the generated command hooks only after they are reviewed and trusted in /hooks. codex exec skips untrusted hooks without a warning, so an untrusted install records nothing. Codex trusts each hook separately, so hooks that a newer setup adds or changes start untrusted while the others stay trusted. setup --cli codex names the hooks that are new or changed since the previous hooks.json. 0.167.0-alpha.3.2 also offers the review when the interactive CLI starts with untrusted hooks.
  • Upgrading: installs made before agent-strace registered SessionEnd, SubagentStart, SubagentStop and PostModelRequest do not have them. Re-run agent-strace setup --cli codex, then trust the new hooks in /hooks. Until setup is re-run, setup --cli codex --verify reports them as missing. --verify cannot see trust: until the new hooks are trusted, codex exec skips them, and setup --cli codex --verify --live reports a session with no model requests. Sessions recorded without SessionEnd keep their active-session markers, so health reports them as session_active.
  • Session end: SessionEnd fires once after the last Stop of a codex exec run and records a session_end event, so health can tell a finished session from an active one. A resumed run (codex exec resume) records a session_start with source resume and continues the same trace. Codex gives SessionEnd hooks a 1 second timeout by default and caps it at 3 seconds; setup sets 3.
  • Subagents: a subagent is not a separate session. Its hooks arrive under the parent session_id, so everything is recorded in the parent trace:
  • SubagentStart and SubagentStop are recorded as subagent_start and subagent_stop events with agent_id, agent_type and turn_id. No child session is created or linked, and these events have no child_session_id or child_link.
  • subagent_stop also records the subagent's final message (last_assistant_message) as text and its transcript as agent_transcript_path, both redacted like the Stop fields. The event is recorded even when stop_hook_active is true. Session summaries and exports take the session's final answer from response events, never from subagent_stop.
  • The subagent's tool calls are recorded as tool_call/tool_result events in the parent trace with the subagent's agent_id and agent_type. Parent tool events carry neither. replay, replay --tree, tree, stats and explain mark these events with [subagent <agent_type> <last 8 characters of agent_id>] or list the subagent with its tool count.
  • Event order observed: the parent's spawn_agent tool call and result, SubagentStart, the parent's wait_agent tool call, the subagent's tool calls, SubagentStop, the wait_agent result, Stop, then SessionEnd. In one 0.163.0-alpha.11 recording SubagentStart fired after the wait_agent call instead, so do not rely on that position.
  • A subagent's model requests are recorded as llm_response events with its agent_id and agent_type.
  • Payload fields observed. SubagentStart: session_id (parent), agent_id, agent_type, turn_id (the subagent's turn), transcript_path, cwd, model, permission_mode. SubagentStop: the same plus agent_transcript_path, last_assistant_message and stop_hook_active. SessionEnd: session_id, reason, transcript_path, cwd. Subagent PreToolUse/PostToolUse payloads also carry agent_id and agent_type. The spawn_agent tool_input has task_name and an encrypted message; 0.167.0-alpha.3.2 adds fork_turns. Payload keys of the registered hooks were otherwise unchanged from 0.163.0-alpha.11.
  • Model requests: PostModelRequest fires after every model request, a subagent's included, on Codex 0.164.0 and later. Older releases ignore the hook in hooks.json. Each request is recorded as one llm_response event:
  • Fields: model, status (completed, failed or cancelled), error when Codex sends one, turn_id and token_usage as sent, plus input_tokens, output_tokens and total_tokens copied from it. A subagent's request also has its agent_id and agent_type.
  • token_usage has input_tokens, cached_input_tokens, cache_write_input_tokens, output_tokens, reasoning_output_tokens and total_tokens. input_tokens already includes the cached and cache-write tokens, output_tokens already includes the reasoning tokens, and total_tokens is input_tokens + output_tokens. Do not add the parts to the totals.
  • The session's total_tokens is the sum of total_tokens over its requests. Its llm_requests stays 0, because it counts llm_request events and this hook records none; validate and backfill rely on that.
  • A failed request has the error text and no token_usage; a cancelled request has neither. Neither is recorded as an error event.
  • A failed request counts as a session error: the hook adds it to the session's errors, and timeline, stats, dashboard, error rates and the other session error counts include it. A cancelled request, which Codex records when the user interrupts or the turn is aborted, is not an error. See Session error counts.
  • The exports report a failed or cancelled request as an error (ERROR span status and error.type in OTLP GenAI, level ERROR in Langfuse); see Failed and cancelled model requests.
  • cost and the exports use these recorded counts for the request; see Responses recorded without a request.
  • The hook runs synchronously, so Codex waits for it before acting on each response.
  • Hooks setup does not register: /hooks in 0.167.0-alpha.3.2 lists 14 hook events and setup registers 9. Recorder-only hooks in the verification runs showed:
  • PreModelRequest fired before each model request. It carries only session_id, turn_id, cwd, transcript_path and model, so setup does not register it: it would add a second process per request and no data beyond the request start time. As a result llm_response events have no parent_id, no llm_request event and no request duration. The entry declares this with results_without_requests, and health reports one declared_results_without_requests provider limitation instead of an orphan per response.
  • PermissionRequest, PreCompact, PostCompact and Interrupt did not fire in these runs.
  • Known gaps:
  • SessionEnd always reports reason other, so the session_end event does not say why the session ended.
  • No event links a subagent to the spawn_agent call that started it (that result names only the task).
  • A failed shell command arrives as a normal PostToolUse with the error text in tool_response and no exit code, so it is recorded as a tool_result, not an error.
  • Token usage is recorded only on Codex 0.164.0 and later, and only once PostModelRequest is trusted. llm_response events have no request event, parent_id or duration.
  • Shell calls arrive as tool Bash with tool_input.command; file and command detail depends on those payloads.
  • Transcript: for a run without hooks, agent-strace import builds a session from its rollout in $CODEX_HOME/sessions. Codex hooks already record response text and token usage, so enrichment is Copilot-only.
  • Local verification: trust every agent-trace command in /hooks, record one small session, exit it cleanly, then run agent-strace setup --cli codex --verify --live.

GitHub Copilot CLI

  • Config: ~/.copilot/hooks/agent-strace.json, or $COPILOT_HOME/hooks/agent-strace.json when COPILOT_HOME is set. The agent-strace Copilot CLI plugin registers the same hooks; use one or the other.
  • Rollback: setup writes a dedicated file and leaves other Copilot hook files unchanged. Remove it with rm ~/.copilot/hooks/agent-strace.json. If you installed the plugin instead, run copilot plugin uninstall agent-strace.
  • Coverage: session start and end, user prompts, tool calls and results, failed tools (postToolUseFailure, recorded as error events), agentStop (recorded as a stop event) and the parent's subagentStart/subagentStop hooks (recorded as subagent_start/subagent_stop events). Response text is unavailable.
  • Verified with Copilot CLI 1.0.107 on 2026-11-09 through agent-strace setup --cli copilot: five copilot -p runs (a plain prompt; a read, a shell command and an edit; a failing read and a shell command that exits 1; a tool denied at the permission prompt; a task subagent) and one interactive session that ran a read and ended with /exit. Each run used a throwaway workspace, an isolated temporary COPILOT_HOME and package cache, a GH_TOKEN environment variable, one --allow-tool grant per needed tool and no approve-all flags. A second hook file logged the raw payload of every hook name the CLI defines. The 1.0.103-0 (2026-10-22) and 1.0.94-3 (2026-10-21) recordings are kept as legacy fixtures. (copilot --version prints 1.0.107, and the session log records the same.)
  • Event order: a main session's trace may begin with its first user_prompt. 1.0.94-3 fired userPromptSubmitted before sessionStart, and 1.0.103-0 did so in some runs. In every 1.0.107 run the payload timestamps put sessionStart first, with userPromptSubmitted 11 to 35 ms later, but Copilot does not wait for the sessionStart hook to finish before running the next hook. The two hook processes race, and in 4 of the 5 copilot -p runs the trace recorded user_prompt first. The entry declares this with events_before_start, so health and the --format otlp-genai evidence attributes report it as the provider limitation declared_events_before_session_start and validate as an info finding, instead of an invalid boundary.
  • Interactive mode: no hook fires when the CLI starts. sessionStart (source new, with initialPrompt) fires with the first prompt, and /exit ends the session with sessionEnd reason user_exit. A copilot -p run ends with reason complete.
  • Tool calls: from 1.0.107, preToolUse, postToolUse and postToolUseFailure carry toolCallId, the same value on a call's pre and post hooks. agent-strace records it as tool_use_id and pairs each result or error with the call that has the same ID, so concurrent calls of the same tool pair correctly. Earlier versions send no call ID; their results are paired with calls by tool name. In the recordings, two calls could start before either result arrived.
  • Subagents: a subagent started with the task tool records prompt, tool and stop events under its own session ID, with no session_start and no session_end. Its metadata is written as github-copilot (no session-start), which health maps to this entry; the session is partial. The parent fires subagentStart and subagentStop:
  • The parent's trace gets subagent_start and subagent_stop events with agent_type, agent_name, stop_reason (stop only) and, when the payload names the child, child_session_id. The response text is not recorded; the task tool result already carries it.
  • When the payload names the child, the child's meta.json gets parent_session_id, depth (parent depth + 1) and, when exactly one task call is pending in the parent, parent_event_id pointing at that tool_call. Otherwise parent_event_id stays empty. tree, replay --tree, replay --expand-subagents and stats --include-subagents then show the child under its parent.
  • Only the child's metadata is changed, atomically under the store write lock; its hash-chained events.ndjson is never rewritten. A missing child is never created, an existing link to a different parent is kept, and erased, pending-deletion, pending-tag and cross-tenant children are skipped with the same checks as backfill-meta. The outcome is recorded as child_link on the parent event (linked, already_linked, missing_child, different_parent, erased, tenant_mismatch, ...). Later hook writes to the child's metadata, including a late sessionStart, keep the link.
  • Payload fields observed on 1.0.107. subagentStop: sessionId (parent), agentId (child session ID), agentType, agentName, parentAgentId, response, stopReason, stop_hook_active and transcriptPath. subagentStart: sessionId, agentId, agentType, agentName, parentAgentId and transcriptPath. Neither carries the task call's toolCallId. On 1.0.103-0, subagentStart sent only sessionId, agentName and transcriptPath in some runs; when subagentStart does not name the child, as in 1.0.94-3, the link is made at subagentStop.
  • Existing installs do not have these hooks: re-run agent-strace setup --cli copilot, or update the plugin. Sessions captured before then stay unlinked; backfill-meta does not link them.
  • Hooks setup does not register: the hook names in 1.0.107 are the same as in 1.0.103-0, and setup registers 9 of them. Recorder-only hooks in the verification runs showed:
  • userPromptTransformed fired after every userPromptSubmitted, in the parent and in subagents, with prompt and transformedPrompt (the prompt with a <current_datetime> block prepended).
  • permissionRequest fired for every shell and file-writing call, including calls granted with --allow-tool. For the denied call it was followed by notification with notification_type permission_prompt.
  • preMcpToolCall, preCompact and errorOccurred did not fire in these runs.
  • Transcript: Copilot writes every session to ~/.copilot/session-state/<sessionId>/events.jsonl (under $COPILOT_HOME when set), with response text, models, token usage and the outcome of every tool call. agent-strace import builds a full session from that file when no hooks ran, and import --enrich adds what the hooks missed to a hook-captured session. The format is undocumented, so both read it defensively.
  • Known gaps:
  • agentStop carries a stop reason and transcript path but no response text, so stop events have empty text. import --enrich --with-text, or AGENT_STRACE_ENRICH=text at session end, adds the response text from the session's events.jsonl.
  • Hook payloads carry no model name or token usage. import --enrich, or AGENT_STRACE_ENRICH=1 at session end, adds both from the session's events.jsonl.
  • Subagent hooks carry no tool call ID, so a subagent's parent_event_id is set only when exactly one task call is pending. Before 1.0.107, tool hooks carry no call ID either, and results are paired with calls by tool name.
  • A shell command that exits non-zero arrives as postToolUse with resultType success. The exit code is only in the result text, so it is recorded as a tool_result, not an error.
  • A tool denied at the permission prompt leaves its tool_call without a result or error. The permissionRequest and notification hooks that report the denial are not registered, and neither are userPromptTransformed, preCompact or errorOccurred. import --enrich adds the outcome from the session's events.jsonl.
  • Child hooks in 1.0.107 and some 1.0.103-0 runs carry agentId, agentType and parentAgentId; agent-strace links only from the parent's subagent hooks and does not use them.
  • File and command activity is visible only in tool arguments and results; no file_write events are recorded.
  • Stores written before agent-strace 0.97.0 have no metadata for subagent sessions. Run agent-strace backfill-meta --apply to make them visible.

GitHub Copilot cloud agent

Coverage is partial, and the entry is unverified: no live cloud agent job has been recorded. See Copilot cloud agent capture for setup and the GitHub documentation it relies on.

  • Config: .github/hooks/agent-strace.json plus .github/hooks/agent-strace-cloud.sh, on the repository's default branch. The cloud agent loads only .github/hooks/*.json from the cloned repository; local Copilot plugins and ~/.copilot hooks do not run there.
  • Rollback: delete both files from the default branch, then remove the AGENT_STRACE_ENDPOINT and AGENT_STRACE_AUTH_KEY Agents secrets and the collector firewall allow rule.
  • Transport: the sandbox filesystem is discarded when the job ends. Events survive only when each hook streams them to an agent-strace server collector named by the AGENT_STRACE_ENDPOINT Agents secret and allowed by the cloud agent firewall.
  • Privacy: by default events are redacted before they leave the sandbox. Agents secrets are readable by the agent, so the collector key must guard nothing else.
  • Captured, when events reach the collector (captured_signals):
  • Session start, once per job (sessionStart)
  • The job prompt, at most once per job (userPromptSubmitted)
  • Tool calls with tool name and arguments (preToolUse)
  • Tool results (postToolUse)
  • Failed tool calls (postToolUseFailure)
  • Agent stop reason (agentStop)
  • Subagent start and stop (subagentStart, subagentStop)
  • Session end with reason complete, error, or timeout (sessionEnd)
  • Not captured (not_captured_signals):
  • Assistant response text and reasoning
  • Model name and token usage
  • errorOccurred, userPromptTransformed, and preCompact events, which fire in cloud agent but are not registered
  • permissionRequest and notification events, which do not fire in cloud agent
  • Setup steps, firewall blocks, and other job log output that does not pass through a hook
  • Any event recorded while AGENT_STRACE_ENDPOINT is unset or the collector is unreachable; it is discarded with the sandbox
  • Every event of a job in which agent-strace is not on PATH and the one-time install fails
  • Links between sessions of separate jobs on the same pull request; each job is recorded as its own session
  • Workflow artifact or pull request attachment upload
  • Known gaps: the Copilot CLI gaps for agentStop text, model and token usage, tool call IDs, and file and command activity also apply. Recorded sessions name the github-copilot agent, so health and evidence reports apply the GitHub Copilot CLI entry rather than this one.

OpenCode

Coverage is partial, and the entry is unverified: runs with OpenCode 2.4.3 were checked by hand, but no recording has been added as a fixture for a verification run. OpenCode has no command hooks. agent-strace setup --cli opencode installs a plugin that OpenCode loads on its own; see OpenCode setup.

  • Config: ~/.config/opencode/plugins/agent-trace.js, under $OPENCODE_CONFIG_DIR or $XDG_CONFIG_HOME/opencode when set. Setup backs up a different agent-trace.js it did not write to agent-trace.js.agent-strace.bak, and never overwrites that backup.
  • Rollback: delete the file, or add "-agent-trace" to "plugins" in opencode.json to turn it off without deleting it.
  • Transport: the plugin runs agent-strace hook --provider opencode with each event on stdin. Sessions are labelled opencode, and health applies this entry.
  • Scope: only sessions whose directory is in a git repository are recorded, because review matches sessions to branches. Set AGENT_STRACE_OPENCODE_SCOPE=all in OpenCode's environment to record every session.
  • Captured (captured_signals):
  • Session start when a run begins, with source resume for a session recorded before (session.execution.started)
  • User prompts (prompt hook)
  • Tool calls with tool name and arguments (tool.execute.before)
  • Tool results and failed tool calls (tool.execute.after)
  • The last assistant reply and the run outcome when a run ends (session.execution.succeeded, failed or interrupted)
  • Session end when a run ends, or when the session is deleted or archived
  • Subagent start and stop in the parent's trace, with the child session linked to its parent
  • Runs: an OpenCode session never ends; it waits for the next prompt. The plugin records each run (the agent's work on one prompt) as a session_start and session_end pair in the same trace. A subagent can run in the background: the parent's run may end first, and when the subagent's result arrives OpenCode starts a new run with it, which the plugin records the same way. The first run starts the session, later runs resume it, and the end reason is completed, error, interrupted, deleted or archived. While a run is in progress, health reports the session as still active. The reply recorded at the end of a run is the assistant text after the run's prompt or subagent result, so a run that ends before it replies records no reply.
  • Subagents: OpenCode runs a subagent in a child session with its own ID. The plugin records the child as its own session, adds subagent_start and subagent_stop events to the parent's trace, and links the child's meta.json to the parent, as for GitHub Copilot CLI. tree and replay --expand-subagents then show the child under its parent. When the parent run ends first, for example when you interrupt it while a subagent works, the subagent's later start or stop is added to the parent only if a new parent run has begun, as when a background subagent's result arrives, so nothing follows a session_end outside a run.
  • Not captured (not_captured_signals):
  • Model name, token usage and reasoning
  • Sessions outside a git repository, unless AGENT_STRACE_OPENCODE_SCOPE=all
  • Tool calls that a provider runs itself, such as the subagent tool under the claude-agent provider, which do not pass through OpenCode's tool hooks
  • Events from an OpenCode version whose plugin API differs from 2.4
  • Known gaps:
  • Checked by hand with OpenCode 2.4.3 (opencode run: prompts, tools, a resumed session and a background subagent), but no recording has been added as a fixture. Tests replay the hook payloads the plugin sends.
  • OpenCode sessions have no end. Each run (the agent's work on one prompt or one background subagent result) is recorded as a start and end pair, so a session that is still running shows as active and a later run resumes it.
  • A subagent session is linked to its parent only when the parent session is recorded too.

Entire checkpoints

Entire records agent sessions as git checkpoints. agent-strace review --entire --commits RANGE reads the checkpoints that Entire-Checkpoint trailers in the range name as sessions, and agent-strace import --entire stores them in the trace store; nothing is installed. Every session read this way is graded partial: see sessions read from a checkpoint. The entry is unverified: the unit tests build checkpoints from Entire's format in temporary repositories, and a weekly format drift check reads checkpoints that real Entire releases write from a synthetic session, but no agent session has been recorded with Entire for a verification run. For the reviewer workflow, in CI and in a local clone, see Review PRs from Entire users.

  • Config: refs/entire/checkpoints/ or the entire/checkpoints/v1 branch, in the clone. A normal clone or fetch does not bring the refs; fetch them with git fetch origin 'refs/entire/checkpoints/*:refs/entire/checkpoints/*'.
  • Rollback: nothing to roll back. agent-strace reads checkpoints with git and changes nothing in the repository, in Entire's settings or in any agent's hooks. import --entire writes only to the trace store; delete a session's directory there to remove it.
  • Read: each checkpoint's metadata.json and, for each session, its metadata.json, its compact transcript transcript.jsonl and its prompt.txt. When a session has no compact transcript, its prompts come from prompt.txt and its file writes from the files its metadata lists.
  • Never read: full.jsonl, the agent's native transcript.
  • Privacy: Entire redacts secrets before it writes a checkpoint. agent-strace removes the project root and home directories from every string and runs its own secret redaction before any text is cut.
  • Coverage: prompts, assistant text, tool calls and tool results from the compact transcript, with the model and token counts the checkpoint carries. The token total adds fresh input, output, cache reads and cache writes. The session start and end are written by agent-strace from the checkpoint metadata. File and command activity is visible in tool arguments and results; a Codex FileChange whose result is a success is also recorded as file writes.
  • Known gaps:
  • Read from a checkpoint after the session, not captured by agent-strace hooks while it ran. A checkpoint is the session author's own record and carries no signature.
  • Reasoning, system prompts and anything else the compact transcript leaves out are absent.
  • Long tool results keep only their start and end, and long prompts and assistant text only their start. Text is cut after secret redaction.
  • Approval decisions, permission modes and subagent transcripts are not read.
  • Turn timestamps can be missing or shared by several events; an event without one takes the time of the event before it.
  • Exit codes are recorded only when the agent's compact transcript carries them. Failed tool calls are tool results marked as errors, not error events.
  • The checkpoint records no session start, end or stop.

Format drift check

Entire publishes nightly pre-releases and its checkpoint layout can change between releases. The Entire format drift workflow checks that agent-strace still reads what Entire writes. It runs every Tuesday and can be started manually from the Actions tab. It does not run on pushes or pull requests, so a new Entire release never fails an unrelated change.

The workflow runs twice on ubuntu-latest: once with a pinned Entire release, v0.13.5, whose entire_linux_amd64.tar.gz SHA-256 is written in the workflow, and once with the newest release, pre-releases included, checked against that release's checksums.txt. A tarball whose checksum does not match fails the run before it is unpacked. For each release, scripts/entire_drift_check.py:

  1. creates a temporary git repository with its own HOME, XDG directories and git config, and enables Entire for Claude Code with telemetry, the update check and session pushes off;
  2. replays a synthetic Claude Code transcript, tests/fixtures/entire_drift/claude-code-transcript.jsonl, through Entire's Claude Code hooks (entire hooks claude-code session-start, user-prompt-submit and stop), applies the session's edits and commits them, so Entire's git hooks add the Entire-Checkpoint trailer and write the checkpoint. No model, account or network is used;
  3. runs agent-strace review --entire --format json and agent-strace import --entire on the commit, and fails unless the session is read from the checkpoint with its prompt and its Read, Edit and Bash tool calls, review finds rationale, scope or validation evidence, and neither command reports a checkpoint or session it skipped.

It does this once with the refs/entire/checkpoints/ refs and once with the entire/checkpoints/v1 branch. The report, with the Entire version, its SHA-256 and what drifted, is written to the run summary. The check passed with Entire 0.11.6, 0.12.0, 0.13.1, 0.13.5 and 0.13.6-nightly.202611280615 on 2026-11-30. A passing run does not make the entry verified: the session is synthetic and no agent ran.

Run it locally on macOS or Linux with Python 3.10 or newer, from the repository root:

ENTIRE_BIN=/path/to/entire python3 scripts/entire_drift_check.py
python3 scripts/entire_drift_check.py --entire /path/to/entire --backend refs --keep

The script never uses your home directory, your git config or an existing repository. --backend checks one backend (refs or branch) instead of both, and --keep keeps the temporary repositories for inspection. Exit status 0 means every backend passed, 1 means agent-strace did not read what that Entire release wrote, and 2 means invalid arguments, a missing tool or a work directory that cannot be created.

When the newest release fails, compare the kept repository's checkpoint with the reader in src/agent_trace/entire_checkpoint.py. To move the pin, set PINNED_TAG and PINNED_SHA256 in the workflow to a release tag and the SHA-256 on the entire_linux_amd64.tar.gz line of that release's checksums.txt.

Evidence from other tools

The matrix covers what agent-strace hooks capture and the Entire checkpoints that review --entire reads as sessions. Other evidence that tools recorded is read separately and reported as external evidence, never as capture coverage: Entire checkpoint trailers and their push state, Copilot cloud agent commits (Agent-Logs-Url trailers, or the agent as author or co-author when no trailer is present, the format observed on 2026-11-16), Claude Code Claude-Session links, declared assistance (Assisted-by and Generated-by trailers and agent Co-authored-by lines), and Claude Code OpenTelemetry safety_event records. Pass --commits RANGE or --otel-logs FILE to health or review.

Machine-readable coverage values

The values below are copied from src/agent_trace/capture_matrix.json. The fixture test checks every provider/capability pair so these examples cannot drift from the published matrix.

Provider session_start session_end prompt response tool file command error stop verification_status
claude captured captured captured captured captured provider_defined provider_defined captured captured verified
codex captured captured captured captured captured provider_defined provider_defined provider_defined captured verified
copilot captured captured captured unavailable captured provider_defined provider_defined captured captured verified
copilot-cloud captured captured captured unavailable captured provider_defined provider_defined captured captured unverified
opencode captured captured captured captured captured provider_defined provider_defined captured captured unverified
entire provider_defined provider_defined captured captured captured provider_defined provider_defined provider_defined unavailable unverified

An entry with incomplete coverage may also set coverage_status to partial and list captured_signals and not_captured_signals: plain-language lists of what the template records and what it cannot. They are documentation for readers and are not read by health or validate. copilot-cloud is the only partial entry.

An entry may also list events_before_start: event types the provider is known to send before its session start hook. agent-strace health reports events of those types before the first session_start as the provider limitation declared_events_before_session_start. Any other event before the start is still the observed events_before_session_start, which makes the session invalid.

An entry may also list results_without_requests: result event types the provider records with no request event. agent-strace health and the dashboard's evidence review report result events of those types with no parent_id once, as the provider limitation declared_results_without_requests, instead of one orphan each. A result that names a missing request is still an orphan. Codex lists llm_response.

agent-strace validate reads only these two fields of the entry, for the provider named by hook-written events. It reports each declared gap as one info finding and a label of the same name, declared_events_before_session_start or declared_results_without_requests, which do not change the status: a Copilot trace that begins with its first user_prompt and a Codex trace with model requests stay valid. An undeclared event type before the start is still an events_before_session_start error. A trace with no hook provider, such as an SDK session or an import, gets no exemption, and neither does any trace when the capture matrix cannot be loaded. validate does not read the known gaps.

Verification policy

A provider entry may move to verified only when tested_version, last_verified, and fixture_test_reference are all populated from a reproducible verification run. Keeping unknown values explicit prevents stale compatibility claims from looking current.

A verification run uses the provider's real CLI with agent-strace hooks, a throwaway workspace, a temporary trace directory, a harmless prompt and no flags that approve every tool. tested_version is the provider's --version output and last_verified is the date of the run. The hook payloads it records are sanitized into tests/fixtures/capture_matrix/: every value that could identify a person, machine, repository or prompt is replaced with a synthetic one, keeping the payload shape and event order. The fixture_test_reference, tests/test_capture_matrix_fixtures.py, replays each fixture through the hook handlers and checks the resulting trace against the entry's coverage and known gaps. To re-verify a provider, repeat the run, refresh its fixture and update tested_version and last_verified.

Freshness

A verified entry is stale when its last_verified date is more than 30 days before the check date. The threshold is a date, not a release count, because both providers ship faster than verification runs can follow: GitHub Copilot CLI publishes a stable release every one to three days and Codex a stable minor about once a week, with prereleases in between, so any release-count rule would flag every entry within days. Hook payloads still changed within a month in both providers (subagentStart fields and event order between Copilot CLI 1.0.94-3 and 1.0.103-0, toolCallId on tool hooks by 1.0.107, the fork_turns input between Codex 0.163.0-alpha.11 and 0.167.0-alpha.3.2), so a verification older than a month should not keep looking current. The same threshold applies to every provider. Unverified entries have no date to age; they are listed for information and never fail the check.

The Capture matrix freshness workflow runs the check every Monday and can be started manually from the Actions tab. It fails when a verified entry is stale or its last_verified is not a valid YYYY-MM-DD date, and writes the report to the run summary. It does not run on pushes or pull requests, so an aging entry never fails an unrelated change. The release runbook includes the same check.

Run it locally from the repository root:

python scripts/check_capture_matrix_freshness.py           # report only, exits 0
python scripts/check_capture_matrix_freshness.py --check   # exits 1 on a stale or malformed entry
python scripts/check_capture_matrix_freshness.py --format json --today 2026-12-01 --max-age-days 45

--today defaults to the current UTC date and --max-age-days to 30. A last_verified date one day after the check date counts as verified that day, which absorbs the difference between a maintainer's local date and UTC; a later date is malformed. Exit status 2 means invalid arguments or an unreadable matrix. The script is repository tooling and is not part of the installed package.

To refresh a stale entry:

  1. Repeat the verification run described in Verification policy with the provider's current release.
  2. Refresh the provider's fixtures in tests/fixtures/capture_matrix/, and update its coverage and known gaps if behavior changed.
  3. Set tested_version and last_verified in src/agent_trace/capture_matrix.json, and update the provider's row and "Verified with" text on this page.
  4. Run python -m unittest discover -s tests -p 'test_capture_matrix*.py' -v and the freshness check.

Do not change last_verified without a verification run. If a provider cannot be re-verified, leave its entry stale so the report keeps showing it.