Agent integrations
AI Code Insights uses native coding-agent hooks or plugins to attribute edits and capture eligible sessions. Use this reference to understand each integration, validate its configuration, and disable or repair one tool without removing the daemon.
Note: Agent APIs change independently from the daemon. Use the current daemon version and include both versions when reporting an integration problem.
Supported agents
| Agent | Code attribution | Transcripts | Token usage | Tool/MCP/Skill usage |
|---|---|---|---|---|
| Codex | Yes | Yes | Yes | Yes |
| Claude Code | Yes | Yes | Yes | Yes |
| Cursor | Yes | Yes | — | Yes |
| Devin CLI | Yes | Yes | Yes | — |
| Devin Desktop (Windsurf) | Yes | Yes | — | — |
| GitHub Copilot | Yes | Yes | — | — |
| Gemini CLI | Yes | Yes | Yes | — |
| OpenCode | Yes | Yes | Yes | — |
| Rovo Dev | Yes | Yes | Yes | Yes |
Tool/MCP/Skill usage
The daemon captures tool, MCP, and skill usage from eligible sessions for Claude Code, Codex, Cursor, and Rovo Dev. See the tool usage schema for collected fields.
Tool usage is sent with session updates on stop, compact, or end events supported by each integration. It follows the same session-directory scope as other session data. The Transcripts & Agent Experience setting does not disable tool-usage collection or storage. See Security and privacy.
Manage integrations
The daemon detects installed tools and reconciles its owned hook entries during installation, on daemon startup, and once per hour. It merges its entries with supported existing configuration rather than replacing unrelated hooks.
Run an immediate reconciliation after installing or updating an agent:
aicodemetricsd install-hooks
Install or repair one integration:
aicodemetricsd install-hooks --tool <tool-name>
Remove one integration while keeping the daemon and other tools active:
aicodemetricsd uninstall-hooks --tool <tool-name>
Check the integration status after any change:
aicodemetricsd status
Run an immediate reconciliation after installing or updating an agent:
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" install-hooks
Install or repair one integration:
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" install-hooks --tool <tool-name>
Remove one integration while keeping the daemon and other tools active:
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" uninstall-hooks --tool <tool-name>
Check the integration status after any change:
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" status
The daemon persists tool-specific install or uninstall choices so the hourly reconciliation does not reverse them.
Integration notes
Codex
| CLI tool | codex |
| Managed configuration | ~/.codex/hooks.json, ~/.codex/config.toml |
The daemon enables Codex hooks, writes its event handlers, and records the matching trust state. The Codex app can still prompt the developer to approve the hook after installation.
Trust the command that contains aicodemetricsd hook codex. If the trust prompt returns after an agent update, repair the integration using the codex tool name and approve the current entry.
Tool usage is read from completed items in Codex session data. It covers command execution, file changes, MCP calls, web search, image generation, and extension tools. Skill usage is identified when structured command metadata records a read of a skill definition. Timing and status fields depend on the session format.
Claude Code
| CLI tool | claude |
| Managed configuration | ~/.claude/settings.json |
The daemon registers file-edit, shell-command, session lifecycle, stop, and compact hooks. End or compact a session before checking for its final session data.
Tool usage is reconstructed from calls and matching results in the session transcript. The daemon identifies explicit skill and MCP calls and records timing, duration, status, and model when available. Calls without a matching result can lack completion metadata.
If Claude Code rewrites its settings during an update, repair the integration using the claude tool name and check status again.
Cursor
| CLI tool | cursor |
| Managed configuration | ~/.cursor/hooks.json |
The integration covers file edits, tab edits, shell commands, session start, stop, and pre-compact events. Cursor does not provide token counts through this integration.
Session messages and tool usage are read from Cursor’s local session database on stop or pre-compact events. Tool records can include a start time, status, model, and skill or MCP tool identifiers. Completion times and durations are not currently available through this integration. Skill usage is identified from reads of recognized skill-definition paths.
Restart open Cursor sessions after the integration is first installed so they load the current hook configuration.
Devin Desktop and Devin CLI
| CLI tool | devin |
| Managed configuration | Desktop: ~/.codeium/windsurf/hooks.json and JetBrains plugin hooksCLI: config.json in the OS user config directory |
Devin Desktop provides edit events and transcript snapshots. Devin CLI provides edit and shell events; its transcript becomes readable only after the session ends.
Devin cannot always provide a reliable working directory. The enable_devin_session_tracking setting is off by default because enabling it can capture all Devin sessions rather than only sessions in monitored repositories. Review this scope with your security team before enabling it.
GitHub Copilot
| CLI tool | github-copilot |
| Managed configuration | ~/.copilot/hooks/ai-insights.json and the hook location in VS Code settings |
The integration preserves unrelated VS Code settings. If Copilot sessions are missing, confirm both the hook file and the VS Code hook-location setting are present, then restart VS Code.
Gemini CLI
| CLI tool | gemini |
| Managed configuration | ~/.gemini/settings.json |
The integration captures edit, shell, session, after-agent, and pre-compress events. End or compress the session before checking final session data.
OpenCode
| CLI tool | opencode |
| Managed configuration | $XDG_CONFIG_HOME/opencode or ~/.config/opencode |
OpenCode loads a daemon-managed JavaScript plugin because it does not expose the same native hook file model as the other tools. The plugin follows XDG_CONFIG_HOME when that variable is set.
If OpenCode uses a nonstandard config root, confirm the plugin was written to the directory used by that OpenCode installation.
Rovo Dev
| CLI tool | rovodev |
| Managed configuration | ~/.rovodev/config.yml |
The daemon preserves a backup before its first change. Session data is read from Rovo Dev’s persisted session directory.
Tool usage is reconstructed from calls and matching results in the persisted session data, including skill and MCP calls. Timing and model fields are included when available; status is recorded only when explicitly supported by the session data. Missing status does not indicate success or failure, and interrupted calls can lack completion times or durations.
Keep session persistence available until the session completes. If the configured persistence directory moves, run the integration check again and inspect the daemon log for session-context read errors.
Coverage limitations
- Hooks report explicit agent events; the daemon does not infer unsupported agent use from code content.
- Browser-generated code pasted into an editor has no agent signal.
- Hooks are designed to fail open, so most errors create missing attribution without blocking the coding agent. An incompatible agent update can still hang or block an action; see the common issues in Troubleshooting.
- Code attribution requires the agent session to start inside a monitored repository and remains limited to files in monitored repositories.
additional_session_directoriesexpands session collection only. - Agent events, transcript contents, timestamps, model identifiers, and token fields differ by tool and version.
- Tool-usage collection does not attribute committed lines to individual tool calls.
- An ended session can have no score when its transcript is missing, too long, or contains insufficient evaluation evidence.
Validate a known commit for each agent and environment you deploy. See Verify deployment.
Troubleshoot an integration
Follow Troubleshooting to check daemon status, collect diagnostics, and escalate an integration problem.
If an integration blocks the agent, remove only that tool’s hooks to unblock development while leaving the rest of the deployment active:
aicodemetricsd uninstall-hooks --tool <tool-name>
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" uninstall-hooks --tool <tool-name>