Skip to content
Edit this page

GitHub Copilot CLI observability

agent-trace records the lifecycle events that GitHub Copilot CLI exposes through hooks. You can install the Copilot plugin or install only the agent-trace hooks. Do not use both at the same time because duplicate hooks can duplicate events.

Capture limits

Copilot CLI does not expose assistant response text in the recorded stop hook. It also does not expose model or token usage in the observed hook payloads. agent-trace cannot reconstruct those fields or hidden reasoning.

The capture matrix names the Copilot CLI release last exercised and lists the current provider gaps. Other releases can behave differently.

Install

Plugin installation adds hooks, a trace analyst agent, and a trace analysis skill:

uv tool install agent-strace
copilot plugin marketplace add Siddhant-K-code/agent-trace
copilot plugin install agent-strace@agent-trace

For hooks without the plugin:

agent-strace setup --cli copilot

See the Copilot plugin guide for upgrade and uninstall commands.

Review captured sessions

agent-strace list
agent-strace health SESSION_ID
agent-strace replay SESSION_ID
agent-strace tree SESSION_ID
agent-strace stats SESSION_ID --include-subagents

Parent subagentStart and subagentStop events can link a task subagent session to its parent. Sessions captured before those hooks were installed remain unlinked.

Known capture gaps

  • The first prompt can arrive before the session-start event.
  • A tool denied at the permission prompt can remain without a result or error.
  • Before Copilot CLI 1.0.107, tool hooks have no call ID, so results are paired by tool name. From 1.0.107 they are paired by toolCallId.
  • A shell command that exits non-zero is recorded as a tool result, not an error; the exit code is only in the result text.
  • File and command activity is visible only when tool arguments or results contain it.
  • Local Copilot plugins do not run in Copilot cloud agent. Repository hooks from agent-strace setup --cli copilot-cloud give partial, unverified coverage; see Copilot cloud agent capture.

Run health to see both observed trace defects and declared provider limitations. A partial trace can still be reviewable, but it is not complete evidence.

For reviewer-facing inspection, the shipped session evidence review is available in the local dashboard and VS Code extension.