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 Tracinghooks.json is dropped into your project root, Copilot CLI auto-discovers it
  • Per-Session Traces — One summary trace per Copilot session on sessionEnd (per-turn flushing on postToolUse available as an opt-in)
  • Cross-Platform Hooks — The connector writes both bash and powershell hook variants, Copilot CLI picks the right one per OS
  • Tool Call Tracking — Parses toolArgs (JSON-encoded string), surfaces toolResult.textResultForLlm as output
  • Error EventserrorOccurred events 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
GuideDescription
Getting StartedInstall, setup wizard, verify connection
ConfigurationProject scope, credentials, environment variables, trace granularity
CommandsFull CLI reference for all infinium-copilot commands

Reference

ReferenceDescription
Traced EventsWhat data is captured and how it maps to traces
TroubleshootingCommon 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)