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:
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
hooksinto~/.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 anassistant_responsewithlast_assistant_messageas its text), tool calls and results paired bytool_use_id, and failed tools (PostToolUseFailure, recorded aserrorevents). Setup registers 7 hooks:SessionStart,UserPromptSubmit,PreToolUse,PostToolUse,PostToolUseFailure,StopandSessionEnd. - Verified with Claude Code
2.1.325on 2026-11-19 throughagent-strace setup --cli claude: fiveclaude -pruns (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; ageneral-purposesubagent that ran a shell command). Each run used a throwaway workspace, a temporaryAGENT_TRACE_DIR,--setting-sources project,localwith the generated hooks passed through--settings, so no user-level hooks ran, and one--allowedToolsgrant 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 against2.1.222on 2026-11-09 was not performed because no credentials were available;2.1.325is the first verified release. - Event order:
SessionStart(sourcestartup),UserPromptSubmit, the tool hooks,Stop, thenSessionEnd(reasonotherin everyclaude -prun).PreToolUseandPostToolUsecarrytool_use_id, and each result pairs with its call by that ID. Every hook that agent-strace needs fired in-pmode. - Failed tools: a read of a missing file and a shell command that exits 1 both fire
PostToolUseFailurewith the failure text in a top-levelerrorfield (for the shell command it starts withExit code 1, followed by the command's error output),is_interruptandduration_ms, and notool_responseor separate exit code. Each becomes anerrorevent paired with its call and counted in the session's errors, with theerrortext, cut to 500 characters, as its text.is_interruptandduration_msare not recorded; the event's duration is measured from itsPreToolUse. - Tool results:
PostToolUsesendstool_responseas 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; seehook. - Subagents: a subagent is not a separate session. Its hooks arrive under the parent
session_idwithagent_idandagent_type. Its tool calls are recorded in the parent trace with those two fields, between the parent'sAgenttool call and result; the parent's own tool events carry neither.SubagentStartandSubagentStopfire but are not registered, so nosubagent_startorsubagent_stopevents are recorded.SubagentStopcarriesagent_transcript_pathandlast_assistant_message. - Hooks setup does not register: recorder-only hooks in the verification runs showed:
PostToolBatchfired after each batch of tool calls, with atool_callslist.MessageDisplayfired before everyStopwith the response text indelta.PermissionRequestfired for the denied write, withpermission_suggestions.SubagentStartandSubagentStopfired around the subagent.- None of the other hook events the recorder registered fired, including
Notification,PermissionDenied,StopFailureand the compaction hooks.WorktreeCreate,WorktreeRemoveandFileChangedwere not recorded. - Known gaps:
PostToolUseFailurehas no separate exit code; a shell command's exit code is only in the recordederrortext.is_interruptis not recorded, so anerrorevent does not say whether the user interrupted the call (no call was interrupted in the verification runs).SessionStartcarries no model name and no hook reports token usage, sosession_starthas an empty model and sessions record no tokens.SubagentStartandSubagentStopare not registered, so a subagent is visible only through theagent_idandagent_typeon its tool events.- A tool denied at the permission prompt (in
claude -p, any call without an--allowedToolsgrant) firesPreToolUseandPermissionRequestbut no post hook, so itstool_callhas no result or error, andhealthreportsunpaired_tool_call. - File and command activity is visible only in tool arguments and results (
tool_input.commandforBash,tool_input.file_pathforRead,EditandWrite); nofile_writeevents 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.bakin 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~/.codexwith"$CODEX_HOME"when it is set. If no config existed before setup, no backup is created; remove the generatedhooks.jsoninstead. - Coverage: session start and end, user prompts, assistant responses,
PreToolUse/PostToolUsetool activity,Stop(recorded as a stop event),SubagentStart/SubagentStop(recorded assubagent_start/subagent_stopevents in the parent trace) andPostModelRequest(onellm_responseevent with token usage per model request). - Verified with
codex-cli 0.167.0-alpha.3.2on 2026-11-09: a tool call, a failing shell command and a spawned subagent, each throughSessionEnd.codex-cli 0.163.0-alpha.11was verified on 2026-10-22 and 2026-10-24; that recording is kept as a legacy fixture. Each run usedcodex execin a throwaway workspace, an isolatedCODEX_HOME, a read-only sandbox and no approval-bypass flags, with the hooks trusted beforehand. The standalonecodex-cli 0.143.0available 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 execskips 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 codexnames the hooks that are new or changed since the previoushooks.json.0.167.0-alpha.3.2also offers the review when the interactive CLI starts with untrusted hooks. - Upgrading: installs made before agent-strace registered
SessionEnd,SubagentStart,SubagentStopandPostModelRequestdo not have them. Re-runagent-strace setup --cli codex, then trust the new hooks in/hooks. Until setup is re-run,setup --cli codex --verifyreports them as missing.--verifycannot see trust: until the new hooks are trusted,codex execskips them, andsetup --cli codex --verify --livereports a session with no model requests. Sessions recorded withoutSessionEndkeep their active-session markers, sohealthreports them assession_active. - Session end:
SessionEndfires once after the lastStopof acodex execrun and records asession_endevent, sohealthcan tell a finished session from an active one. A resumed run (codex exec resume) records asession_startwith sourceresumeand continues the same trace. Codex givesSessionEndhooks 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: SubagentStartandSubagentStopare recorded assubagent_startandsubagent_stopevents withagent_id,agent_typeandturn_id. No child session is created or linked, and these events have nochild_session_idorchild_link.subagent_stopalso records the subagent's final message (last_assistant_message) astextand its transcript asagent_transcript_path, both redacted like theStopfields. The event is recorded even whenstop_hook_activeis true. Session summaries and exports take the session's final answer from response events, never fromsubagent_stop.- The subagent's tool calls are recorded as
tool_call/tool_resultevents in the parent trace with the subagent'sagent_idandagent_type. Parent tool events carry neither.replay,replay --tree,tree,statsandexplainmark 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_agenttool call and result,SubagentStart, the parent'swait_agenttool call, the subagent's tool calls,SubagentStop, thewait_agentresult,Stop, thenSessionEnd. In one0.163.0-alpha.11recordingSubagentStartfired after thewait_agentcall instead, so do not rely on that position. - A subagent's model requests are recorded as
llm_responseevents with itsagent_idandagent_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 plusagent_transcript_path,last_assistant_messageandstop_hook_active.SessionEnd:session_id,reason,transcript_path,cwd. SubagentPreToolUse/PostToolUsepayloads also carryagent_idandagent_type. Thespawn_agenttool_inputhastask_nameand an encryptedmessage;0.167.0-alpha.3.2addsfork_turns. Payload keys of the registered hooks were otherwise unchanged from0.163.0-alpha.11. - Model requests:
PostModelRequestfires after every model request, a subagent's included, on Codex0.164.0and later. Older releases ignore the hook inhooks.json. Each request is recorded as onellm_responseevent: - Fields:
model,status(completed,failedorcancelled),errorwhen Codex sends one,turn_idandtoken_usageas sent, plusinput_tokens,output_tokensandtotal_tokenscopied from it. A subagent's request also has itsagent_idandagent_type. token_usagehasinput_tokens,cached_input_tokens,cache_write_input_tokens,output_tokens,reasoning_output_tokensandtotal_tokens.input_tokensalready includes the cached and cache-write tokens,output_tokensalready includes the reasoning tokens, andtotal_tokensisinput_tokens + output_tokens. Do not add the parts to the totals.- The session's
total_tokensis the sum oftotal_tokensover its requests. Itsllm_requestsstays 0, because it countsllm_requestevents and this hook records none;validateandbackfillrely on that. - A failed request has the error text and no
token_usage; a cancelled request has neither. Neither is recorded as anerrorevent. - A failed request counts as a session error: the hook adds it to the session's
errors, andtimeline,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.typein OTLP GenAI, levelERRORin Langfuse); see Failed and cancelled model requests. costand 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:
/hooksin0.167.0-alpha.3.2lists 14 hook events and setup registers 9. Recorder-only hooks in the verification runs showed: PreModelRequestfired before each model request. It carries onlysession_id,turn_id,cwd,transcript_pathandmodel, so setup does not register it: it would add a second process per request and no data beyond the request start time. As a resultllm_responseevents have noparent_id, nollm_requestevent and no request duration. The entry declares this withresults_without_requests, andhealthreports onedeclared_results_without_requestsprovider limitation instead of an orphan per response.PermissionRequest,PreCompact,PostCompactandInterruptdid not fire in these runs.- Known gaps:
SessionEndalways reports reasonother, so thesession_endevent does not say why the session ended.- No event links a subagent to the
spawn_agentcall that started it (that result names only the task). - A failed shell command arrives as a normal
PostToolUsewith the error text intool_responseand no exit code, so it is recorded as atool_result, not anerror. - Token usage is recorded only on Codex
0.164.0and later, and only oncePostModelRequestis trusted.llm_responseevents have no request event,parent_idor duration. - Shell calls arrive as tool
Bashwithtool_input.command; file and command detail depends on those payloads. - Transcript: for a run without hooks,
agent-strace importbuilds 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 runagent-strace setup --cli codex --verify --live.
GitHub Copilot CLI¶
- Config:
~/.copilot/hooks/agent-strace.json, or$COPILOT_HOME/hooks/agent-strace.jsonwhenCOPILOT_HOMEis 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, runcopilot plugin uninstall agent-strace. - Coverage: session start and end, user prompts, tool calls and results, failed tools (
postToolUseFailure, recorded aserrorevents),agentStop(recorded as a stop event) and the parent'ssubagentStart/subagentStophooks (recorded assubagent_start/subagent_stopevents). Response text is unavailable. - Verified with Copilot CLI
1.0.107on 2026-11-09 throughagent-strace setup --cli copilot: fivecopilot -pruns (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; atasksubagent) and one interactive session that ran a read and ended with/exit. Each run used a throwaway workspace, an isolated temporaryCOPILOT_HOMEand package cache, aGH_TOKENenvironment variable, one--allow-toolgrant per needed tool and no approve-all flags. A second hook file logged the raw payload of every hook name the CLI defines. The1.0.103-0(2026-10-22) and1.0.94-3(2026-10-21) recordings are kept as legacy fixtures. (copilot --versionprints1.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-3fireduserPromptSubmittedbeforesessionStart, and1.0.103-0did so in some runs. In every1.0.107run the payload timestamps putsessionStartfirst, withuserPromptSubmitted11 to 35 ms later, but Copilot does not wait for thesessionStarthook to finish before running the next hook. The two hook processes race, and in 4 of the 5copilot -pruns the trace recordeduser_promptfirst. The entry declares this withevents_before_start, sohealthand the--format otlp-genaievidence attributes report it as the provider limitationdeclared_events_before_session_startandvalidateas aninfofinding, instead of an invalid boundary. - Interactive mode: no hook fires when the CLI starts.
sessionStart(sourcenew, withinitialPrompt) fires with the first prompt, and/exitends the session withsessionEndreasonuser_exit. Acopilot -prun ends with reasoncomplete. - Tool calls: from
1.0.107,preToolUse,postToolUseandpostToolUseFailurecarrytoolCallId, the same value on a call's pre and post hooks. agent-strace records it astool_use_idand 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
tasktool records prompt, tool and stop events under its own session ID, with nosession_startand nosession_end. Its metadata is written asgithub-copilot (no session-start), whichhealthmaps to this entry; the session ispartial. The parent firessubagentStartandsubagentStop: - The parent's trace gets
subagent_startandsubagent_stopevents withagent_type,agent_name,stop_reason(stop only) and, when the payload names the child,child_session_id. Theresponsetext is not recorded; thetasktool result already carries it. - When the payload names the child, the child's
meta.jsongetsparent_session_id,depth(parent depth + 1) and, when exactly onetaskcall is pending in the parent,parent_event_idpointing at thattool_call. Otherwiseparent_event_idstays empty.tree,replay --tree,replay --expand-subagentsandstats --include-subagentsthen show the child under its parent. - Only the child's metadata is changed, atomically under the store write lock; its hash-chained
events.ndjsonis 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 asbackfill-meta. The outcome is recorded aschild_linkon the parent event (linked,already_linked,missing_child,different_parent,erased,tenant_mismatch, ...). Later hook writes to the child's metadata, including a latesessionStart, keep the link. - Payload fields observed on
1.0.107.subagentStop:sessionId(parent),agentId(child session ID),agentType,agentName,parentAgentId,response,stopReason,stop_hook_activeandtranscriptPath.subagentStart:sessionId,agentId,agentType,agentName,parentAgentIdandtranscriptPath. Neither carries thetaskcall'stoolCallId. On1.0.103-0,subagentStartsent onlysessionId,agentNameandtranscriptPathin some runs; whensubagentStartdoes not name the child, as in1.0.94-3, the link is made atsubagentStop. - 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-metadoes not link them. - Hooks setup does not register: the hook names in
1.0.107are the same as in1.0.103-0, and setup registers 9 of them. Recorder-only hooks in the verification runs showed: userPromptTransformedfired after everyuserPromptSubmitted, in the parent and in subagents, withpromptandtransformedPrompt(the prompt with a<current_datetime>block prepended).permissionRequestfired for every shell and file-writing call, including calls granted with--allow-tool. For the denied call it was followed bynotificationwithnotification_typepermission_prompt.preMcpToolCall,preCompactanderrorOccurreddid not fire in these runs.- Transcript: Copilot writes every session to
~/.copilot/session-state/<sessionId>/events.jsonl(under$COPILOT_HOMEwhen set), with response text, models, token usage and the outcome of every tool call.agent-strace importbuilds a full session from that file when no hooks ran, andimport --enrichadds what the hooks missed to a hook-captured session. The format is undocumented, so both read it defensively. - Known gaps:
agentStopcarries a stop reason and transcript path but no response text, so stop events have empty text.import --enrich --with-text, orAGENT_STRACE_ENRICH=textat session end, adds the response text from the session'sevents.jsonl.- Hook payloads carry no model name or token usage.
import --enrich, orAGENT_STRACE_ENRICH=1at session end, adds both from the session'sevents.jsonl. - Subagent hooks carry no tool call ID, so a subagent's
parent_event_idis set only when exactly onetaskcall is pending. Before1.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
postToolUsewithresultTypesuccess. The exit code is only in the result text, so it is recorded as atool_result, not anerror. - A tool denied at the permission prompt leaves its
tool_callwithout a result or error. ThepermissionRequestandnotificationhooks that report the denial are not registered, and neither areuserPromptTransformed,preCompactorerrorOccurred.import --enrichadds the outcome from the session'sevents.jsonl. - Child hooks in
1.0.107and some1.0.103-0runs carryagentId,agentTypeandparentAgentId; 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_writeevents are recorded. - Stores written before agent-strace 0.97.0 have no metadata for subagent sessions. Run
agent-strace backfill-meta --applyto 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.jsonplus.github/hooks/agent-strace-cloud.sh, on the repository's default branch. The cloud agent loads only.github/hooks/*.jsonfrom the cloned repository; local Copilot plugins and~/.copilothooks do not run there. - Rollback: delete both files from the default branch, then remove the
AGENT_STRACE_ENDPOINTandAGENT_STRACE_AUTH_KEYAgents 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 servercollector named by theAGENT_STRACE_ENDPOINTAgents 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
agentStoptext, model and token usage, tool call IDs, and file and command activity also apply. Recorded sessions name thegithub-copilotagent, sohealthand 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_DIRor$XDG_CONFIG_HOME/opencodewhen set. Setup backs up a differentagent-trace.jsit did not write toagent-trace.js.agent-strace.bak, and never overwrites that backup. - Rollback: delete the file, or add
"-agent-trace"to"plugins"inopencode.jsonto turn it off without deleting it. - Transport: the plugin runs
agent-strace hook --provider opencodewith each event on stdin. Sessions are labelledopencode, andhealthapplies this entry. - Scope: only sessions whose directory is in a git repository are recorded, because
reviewmatches sessions to branches. SetAGENT_STRACE_OPENCODE_SCOPE=allin 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_startandsession_endpair 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 iscompleted,error,interrupted,deletedorarchived. While a run is in progress,healthreports 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_startandsubagent_stopevents to the parent's trace, and links the child'smeta.jsonto the parent, as for GitHub Copilot CLI.treeandreplay --expand-subagentsthen 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 asession_endoutside 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 --entirewrites only to the trace store; delete a session's directory there to remove it. - Read: each checkpoint's
metadata.jsonand, for each session, itsmetadata.json, its compact transcripttranscript.jsonland itsprompt.txt. When a session has no compact transcript, its prompts come fromprompt.txtand 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
FileChangewhose 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
errorevents. - 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:
- 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; - 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-submitandstop), applies the session's edits and commits them, so Entire's git hooks add theEntire-Checkpointtrailer and write the checkpoint. No model, account or network is used; - runs
agent-strace review --entire --format jsonandagent-strace import --entireon the commit, and fails unless the session is read from the checkpoint with its prompt and itsRead,EditandBashtool 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:
- Repeat the verification run described in Verification policy with the provider's current release.
- Refresh the provider's fixtures in
tests/fixtures/capture_matrix/, and update its coverage and known gaps if behavior changed. - Set
tested_versionandlast_verifiedinsrc/agent_trace/capture_matrix.json, and update the provider's row and "Verified with" text on this page. - Run
python -m unittest discover -s tests -p 'test_capture_matrix*.py' -vand 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.