GitHub Copilot CLI plugin¶
The agent-strace Copilot CLI plugin records lifecycle events and adds a trace
analyst agent and skill for investigating sessions. It does not register the
MCP server; add that separately.
Install¶
Install the zero-dependency Python CLI first so the plugin hooks can invoke it:
Add this repository as a marketplace, then install its plugin:
copilot plugin marketplace add Siddhant-K-code/agent-trace
copilot plugin install agent-strace@agent-trace
Restart Copilot CLI after installation. Do not also install the hooks with
agent-strace setup --cli copilot; both approaches register the same hooks and
would record duplicate events. When this plugin is installed and enabled,
agent-strace setup --cli copilot skips writing ~/.copilot/hooks/agent-strace.json
and tells you to remove that file if an earlier setup created it.
While the plugin is installed, setup does not apply --redact or
--no-redact to Copilot CLI and says so. To use either flag, uninstall the
plugin first.
Verify¶
In an interactive Copilot CLI session, use /agent to select
agent-strace:trace-analyst or run /skills list to confirm the agent-strace
skill loaded. New sessions are written to .agent-traces/ in the working
directory.
Use¶
Ask Copilot to analyze the latest agent trace, or run commands directly:
The skill and the trace analyst also cover the step before a pull request
opens: agent-strace review --format markdown for the PR body, and
agent-strace share --dry-run before writing an evidence packet. See
review.md.
The hooks capture session starts and ends, prompts, successful and failed tool
calls, agent-stop events, and subagent starts and stops exposed by Copilot CLI.
Subagents started with the task tool are linked to their parent session, so
agent-strace tree shows them. Secret redaction remains enabled by default.
Plugins installed before the subagent hooks were added do not register them.
Upgrade agent-strace, run copilot plugin marketplace update agent-trace and
copilot plugin update agent-strace, then restart Copilot CLI. An older
agent-strace rejects the new hook names with "Unknown hook event"; in a test
copilot -p run, Copilot CLI 1.0.103-0 ignored the failed hooks and finished
normally. Sessions
captured before the update stay unlinked.
Develop locally¶
From a clone of this repository:
pip install -e .
copilot plugin marketplace add "$PWD"
copilot plugin install agent-strace@agent-trace
The repository ships the Copilot plugin twice, plus a separate Codex package:
| Package | Manifest | Agent | Hooks | Used by |
|---|---|---|---|---|
| Repo root | plugin.json (legacy) |
agents/ |
hooks.json |
This repo's marketplace, all Copilot CLI versions |
plugins/agent-strace/ |
plugin.json (Agent Plugins 1.0) |
com.github.copilot/agents/ |
com.github.copilot/hooks/hooks.json |
Marketplaces that require Agent Plugins 1.0 |
plugins/agent-strace-codex/ |
.codex-plugin/plugin.json |
none | hooks/hooks.json |
OpenAI Codex only; see the Codex plugin guide |
The repo root is also the Claude Code plugin (.claude-plugin/, hooks/hooks.json). The root plugin.json names hooks.json explicitly, so Copilot CLI never falls back to the Claude-format hooks/hooks.json. Codex reads .agents/plugins/marketplace.json, which lists only the Codex package. No package registers the MCP server: plugin MCP servers start in the plugin directory, not your project, so they would read the wrong .agent-traces/.
plugins/agent-strace/ holds copies of skills/, agents/, and hooks.json. Edit both copies together; tests/test_plugin.py checks them. plugins/agent-strace-codex/skills/ holds a third copy of the skill, which tests/test_codex_plugin.py checks.
Copilot caches installed plugin components. Run
copilot plugin marketplace update agent-trace followed by
copilot plugin update agent-strace after changing the manifest, hooks, agent,
or skill.
Uninstall¶
Locally installed plugins run only in Copilot CLI. Copilot cloud agent does not load plugins installed on a developer machine. For partial cloud agent capture through repository hooks, see Copilot cloud agent capture.