The Infinium Copilot CLI Connector automatically captures your GitHub Copilot CLI sessions and sends structured traces to the Infinium platform, where Maestro — our behavioral intelligence engine — analyzes and scores agent performance.
No code changes required. Install the connector, run the setup wizard, and every Copilot CLI session run from your project is traced automatically.
Core Concept
Copilot CLI does the work. The connector captures what happened. Maestro evaluates how well it went.
The connector hooks into Copilot CLI’s native hooks.json discovery and records facts — prompts, tool calls, results, errors, session end reasons — then sends them to Infinium as structured traces. Maestro interprets the trace and scores performance without the agent ever evaluating itself.
How It Works
Copilot CLI Session (from your cwd)
│
├── sessionStart ← Hook fires (auto-discovered from ./hooks.json)
├── userPromptSubmitted ← Captures prompt
├── preToolUse ← Tool name + toolArgs (JSON string)
├── postToolUse ← toolResult {resultType, textResultForLlm}
├── errorOccurred ← Error message, name, stack
├── sessionEnd ← reason (complete/error/abort/timeout/user_exit)
│ → sends trace
▼
Infinium Connector
│
├── Converts Unix-ms timestamps to ISO 8601
├── Normalizes event names (camelCase / PascalCase aliases)
├── Synthesizes sessionId from parent PID if absent
├── Synthesizes an assistant-response summary from the last tool result
│ (Copilot CLI has no final-message event)
├── Aggregates events into structured turns
├── Builds: TaskData (steps, errors, tools, durations)
├── Sends: POST /agents/{id}/trace
│
▼
Infinium Platform
│
└── Maestro evaluates trace quality and scores performance
Features
- Zero-Config Tracing —
hooks.jsonis dropped into your project root, Copilot CLI auto-discovers it - Per-Session Traces — One summary trace per Copilot session on
sessionEnd(per-turn flushing onpostToolUseavailable as an opt-in) - Cross-Platform Hooks — The connector writes both
bashandpowershellhook variants, Copilot CLI picks the right one per OS - Tool Call Tracking — Parses
toolArgs(JSON-encoded string), surfacestoolResult.textResultForLlmas output - Error Events —
errorOccurredevents become structured errors in the trace - Response Synthesis — Since Copilot CLI has no “final assistant message” event, the connector builds a summary from the last tool result + session-end reason so Maestro has something to grade
- Secure Credentials — Agent secret stored in OS keyring (Windows Credential Manager, macOS Keychain, Linux Secret Service)
- Per-Project Agents — Different projects can trace to different Infinium agents
- Pause & Resume — Temporarily disable tracing without reconfiguring
- Failed Trace Retry — Automatic recovery from network failures
- Non-Blocking — Traces are built and sent in a detached background worker so Copilot CLI is never blocked
Quick Links
| Guide | Description |
|---|---|
| Getting Started | Install, setup wizard, verify connection |
| Configuration | Project scope, credentials, environment variables, trace granularity |
| Commands | Full CLI reference for all infinium-copilot commands |
Reference
| Reference | Description |
|---|---|
| Traced Events | What data is captured and how it maps to traces |
| Troubleshooting | Common issues and how to resolve them |
Package Info
- PyPI:
infinium-copilot-cli-connector - CLI:
infinium-copilot - Python: >= 3.9
- Dependencies:
infinium-o2,click,keyring - License: MIT
Compatibility
- GitHub Copilot CLI: GA as of February 2026 and later
- Platforms: Windows, macOS, Linux (the connector emits both bash and powershell hook commands, so Copilot CLI picks the right one automatically)