AI Code Insights

AI coding agents are writing code across your organization every day. AI Code Insights shows you what they produce, how they work, and where they get stuck — so you can measure AI’s real contribution and unblock agents that aren’t delivering.

AI Code Insights lets you:

  • See which commits and pull requests contain AI-generated code.
  • Understand how AI-heavy pull requests move through review and delivery.
  • Connect coding-agent adoption with velocity and quality signals.
  • Use session-level data to identify where agents need better context, steering, or task scope.
  • Trace coding sessions to the commits, pull requests, and deployments they produced.

How it works

  1. Install the AI Code Insights daemon.
  2. Work with a supported agent.
  3. Commit and push your changes.

Supported agents report file edits and session activity to the local daemon through native hooks or plugins. The daemon attributes code when you commit, and DX connects those metrics with source control, team, and delivery data after you push.

Supported coding agents

AI Code Insights attributes AI code and sessions through direct agent hooks for: Codex, Claude Code, Cursor, Devin CLI, Devin Desktop (Windsurf), GitHub Copilot, Gemini CLI, Kiro, OpenCode, Pi, and Rovo Dev.

For both Codex and Claude Code, support includes local coding sessions in the CLI and desktop app.

See Supported capabilities for the data available from each agent. Agents without a native integration are not attributed — code they produce is counted as human-authored.

Supported capabilities

Agent Code attribution Transcripts Token usage Tool/MCP/Skill usage
Codex CLI Yes Yes Yes Yes
Codex Desktop app Yes Yes Yes Yes
Claude Code CLI Yes Yes Yes Yes
Claude Code Desktop app 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 —
Kiro Yes Yes — Yes
OpenCode Yes Yes Yes —
Pi Yes Yes Yes Yes
Rovo Dev Yes Yes Yes Yes

Devin CLI and Devin Desktop are captured only when enable_devin_session_tracking is on. It is off by default.

Capability Support Details
Edit, write, and patch tools Yes Native agent hooks or plugins report accepted edits to the daemon.
Files created or changed through Bash and shell tools Yes Supported for every listed agent. A command that starts with cd <folder> is attributed to that folder’s repository.
Git worktrees Yes The daemon discovers linked worktrees, including worktrees of a bare repository, and attributes commits to the parent monitored repository.
Background and cloud agents No Cloud-hosted agent activity is not currently captured.
Multiple agent sessions contributing to the same commit Yes A committed file can retain links to multiple contributing session IDs.
Human changes to AI-generated code Partial DX reports original, retained, modified, and deleted AI lines plus similarity; it does not provide a user-facing line-by-line override view.
Sessions that produce no committed code Yes Sessions can be captured independently of commits when Transcripts & Agent Experience is enabled.
Accepted rate per session No DX measures committed AI retention, not a per-session suggestion acceptance rate.
Added and deleted lines per session Partial Session drilldowns link to resulting commit and pull request additions and deletions, but lines are not exclusively allocated when multiple sessions contribute.
Tool usage capture Agent-dependent Captures tool calls within sessions for Codex, Claude Code, Cursor, Kiro, Pi, and Rovo Dev.
MCP usage capture Agent-dependent Captures MCP tool invocations for Codex, Claude Code, Cursor, Kiro, Pi, and Rovo Dev.
Skill usage capture Agent-dependent Captures skill usage for Codex, Claude Code, Cursor, Kiro, Pi, and Rovo Dev when the integration identifies a skill invocation or skill-definition read.
Code attribution per tool call No Tool-usage collection does not attribute committed lines to individual tool calls.
Subagent tracking Agent-dependent Claude Code and Codex subagent sessions and their lineage are captured; other agents are not currently supported.
Tokens and cost per commit or pull request No Token usage is session-level when an agent exposes it; DX does not allocate session tokens or cost to individual commits or pull requests.
Formatters Partial Retained AI content keeps its attribution, while lines materially rewritten by a formatter can be reported as modified or human-authored.
Multi-repository agent roots Partial Edits are attributed in every monitored repository, even when the session starts in a parent folder. Shell commands are attributed in the repository they run in. Session data needs the session to start in a monitored repository or an additional session directory.
Very large monorepos Partial Repository size can affect daemon performance and attribution accuracy. Test machine performance and representative commits before a broad rollout.
Operation Support Details
git rebase Partial Clean replays preserve attribution. Commits whose patches change are re-analyzed, so results can differ.
git cherry-pick Yes Matching patches carry attribution to the new commit and branch.
git stash / git stash pop Yes Retained attribution is recovered when stashed content is reintroduced; conflict edits can change the result.
git merge --squash No The resulting commit is not guaranteed to inherit attribution from commits on the source branch.
git reset --soft Yes Attribution is retained when commits are combined and recommitted.
git reset --mixed Yes Working-tree attribution is retained for the subsequent commit.
git reset --hard Yes Attribution remains for commits that are still reachable or were already reported; discarded uncommitted work is not retained.
git merge Yes Source commits keep their attribution, and new merge-resolution changes are analyzed in the merge commit.
git commit --amend Yes The replacement commit is analyzed and the superseded local result is reconciled.
git checkout / git switch Yes Uncommitted attribution follows the working tree when switching branches.
git pull and git pull --rebase Yes Fast-forward and rebase workflows are reconciled.
git push / git fetch Yes Pushed attribution is sent after the daemon confirms the commit on a remote branch; fetching does not remove attribution.
git mv Yes Attribution follows a renamed file, including a rename with subsequent human edits.
git filter-branch / git filter-repo No Bulk history rewrites are not tracked.
git replace No Git object replacements are not tracked.
Detached HEAD Yes Commits made on a detached HEAD, such as in Codex app worktrees, are reported once a remote branch contains them.
Custom stack and restack workflows Partial Results depend on the underlying Git operations; unsupported history rewrites can lose attribution.
Operation Support Details
Squash and merge Partial DX can report the original pull request commits when they were uploaded and matched by the source control connector, but the new server-created commit is not re-attributed by the local daemon.
Rebase and merge Partial DX can report the original pull request commits, but server-created replacement commits do not inherit local daemon attribution.
Merge queues and branch updates Partial On GitHub and Bitbucket Cloud, when a merge queue, Update branch with rebase, or a restack rewrites a pull request’s commits, DX credits each new commit with the attribution of the commit it replaced when their patches match. Private GitHub repositories require the GitHub connector’s Repository Contents permission.

Available reports

AI Code Insights powers the following reports and session-level views:

  • AI code percentage — See how much committed code is attributed to supported coding agents.
  • AI pull request overview — Compare delivery and review signals across pull requests with different levels of AI-attributed code.
  • Agent effectiveness — Explore Agent Experience Score, work types, model usage and fit, and Skill and MCP usage across local agent sessions.
  • Agent sessions — Explore captured coding-agent sessions, inspect their activity, and follow work lineage to linked issues, PRs, and deployments.
  • AI Dollar Impact — Estimate the value of AI agent usage.
  • AI Cost Management — Track AI token usage and budgets across your organization.

Privacy

AI Code Insights is designed to measure code authorship, not monitor developers.

  • Source snapshots and raw Git diffs stay on the developer’s machine.
  • Transcript retention and analysis are optional and off by default.
  • The daemon scrubs common secret and personal-data patterns before sending eligible session messages to DX.
  • Admins control transcript access and whether sensitive transcript data can be queried in Data Studio.

See Security and privacy for the complete data flow, controls, and considerations.

Get started

  1. Plan a pilot.
  2. Install on one machine or prepare an enterprise deployment.
  3. Verify deployment.

FAQs

Supported agents report file edits through native hooks or plugins. The daemon compares those edit signals with the final committed files on the developer’s machine. It does not use an LLM or a heuristic to guess whether code looks AI-generated.

No. The developer can commit through their normal Git client, IDE, or command line. Attribution comes from the supported agent’s edit signals, not from who runs the commit command.

No. The daemon can only attribute edits it observes after it is installed and running. Earlier commits are not attributed retroactively.

AI Code Insights needs an observed signal from a supported agent integration. Code from an unsupported agent, a cloud agent, or a browser-based AI tool that is pasted into an editor has no attribution signal and can appear as 0% AI. A missing or unhealthy daemon integration, an edit to a file outside a monitored repository, or an unsupported Git history rewrite can have the same effect. Treat 0% as “no AI attribution was retained for this commit,” not proof that every line was written manually.

- means no AI attribution value is available for that commit.

0% means AI attribution is available for the commit, and measured AI-attributed changes are zero.

For example:

  • A developer starts with AI-generated code, rewrites all of it manually, and commits the rewritten code. The commit shows 0%.
  • A commit with no available AI attribution value shows -.

For detailed diagnostics, see Troubleshooting.

No. Code attribution, AI code percentage, and AI pull request reporting work without transcript retention. Transcripts & Agent Experience is required for Agent sessions, session details, and Agent effectiveness, including Agent Experience Score. Viewing session message content also requires transcript access.

Source snapshots and raw Git diffs used for commit attribution stay on the developer’s machine. DX receives commit metadata and attribution metrics. If transcript collection is enabled, eligible session messages are scrubbed before transmission but can still contain code or sensitive text that the scrubber does not detect. See Security and privacy for details.

Yes. Linked Git worktrees and commits made on a detached HEAD are supported. For remote SSH, development containers, and other remote environments, install the daemon where the repository and coding agent run. Ephemeral environments must include or reinstall the daemon when they are created.

Confirm that representative machines, repositories, and agents are reporting data, then validate a known commit. Follow Verify deployment before using the reports to compare teams or guide a broader rollout.

Yes. Lines in auto-generated files are not attributed to AI or to developers, though they still count in total Git churn. The daemon applies a built-in list of common cache locations and lock files by default. It also applies one configured list: the central auto-generated file patterns list in DX when it is not empty, and otherwise each developer’s local auto_generated_patterns. The central and local lists are not combined.