Skip to main content

Configuring Claude Code

Track Claude Code adoption and usage across your teams. Connect Claude to understand how AI-attributed code activity contributes to delivery insights.

Steven Silverstone
Updated by Steven Silverstone

Overview

LinearB integrates with Claude Code to capture AI coding activity and power AI Analytics dashboards.

Once connected, Claude usage data is ingested into LinearB and contributes to AI usage metrics, adoption insights, and impact analysis.


Historical Data & Backfill

When Claude Code is first connected, LinearB backfills up to 90 days of historical Claude usage data.

Activity that occurred before this window will not appear in AI Analytics or AI Insights.

After the initial sync, Claude usage data is updated daily.


Supported Environments

LinearB supports Claude Code when accessed via the Anthropic direct API.

Claude Code accessed via AWS Bedrock is not currently supported.

Claude Code API usage is separate from the Anthropic Admin Console UI. LinearB integration requires an Admin-level API key but does not rely on data from the Anthropic Console interface.


Before You Begin

  • You must have Admin access in LinearB.
  • You must generate an Admin-level Anthropic API key.
  • Anthropic API keys do not support fine-grained scopes. An Admin-level API key is required.

Step 1 — Generate a Claude Code API Key

  1. Log in to your Anthropic admin console.
  2. Navigate to the API Keys section.
  3. Generate a new API key.
  4. Ensure the key has Admin privileges.
  5. If the key is rotated or revoked, you will need to update it in LinearB.

Step 2 — Connect Claude Code in LinearB

  1. Go to Settings > Company Settings > AI Tools.
  2. Select the Claude Code tab.
  3. Paste your generated API key into the Token field.
  4. Click Save.
  5. If successful, the integration status will show Connected.

What Data Is Ingested

LinearB uses the Claude Code API to pull daily user activity data.

This data is used to analyze:

  • AI usage
  • AI adoption
  • AI impact on development workflows

Claude activity is correlated with Git commit data to determine AI-assisted work and attribute usage to specific users and pull requests.


How AI-Assisted Work Is Calculated

AI-assisted work is determined using both Git metadata and Claude usage API data.

AI-Assisted Lines

A line of code is considered AI-assisted if:

  • It appears in a commit containing an AI co-author marker, or
  • It is reported as accepted AI-generated code via the Claude usage API.

Daily AI Classification

For each user, LinearB calculates:

AI-assisted lines committed that day
÷
Total lines committed to Git that day

If more than 50% of the lines committed by a user on a given day are AI-assisted, all commits from that user on that day are marked as AI-assisted.

PR-Level AI Classification

A pull request is marked as AI-assisted if it contains at least one AI-assisted commit, regardless of when the PR was opened or merged.

% Code Done AI-Assisted (User-Level)

For a specific user, the percentage of AI-assisted code is calculated as:

Lines of code from AI-assisted commits
÷
Total lines of code from all commits

This calculation is based on lines of code, not PR count.


Metric Availability for Claude

Claude Code does not currently support suggestion-level Acceptance Rate metrics.

Unlike GitHub Copilot, Claude does not expose suggestion acceptance telemetry via its API. As a result, Acceptance Rate and suggestion-level acceptance metrics are not available for Claude.


Where Claude Data Appears

Claude Code activity contributes to:

  • AI Active Users
  • AI Adoption Rate
  • AI Coding Activity
  • AI Actions
  • AI grouping under Coding Assistance
  • AI Analytics Dashboard
  • AI Insights Dashboard
  • AI-related metrics within the Metrics area (when AI filters are applied)

You can filter by team to measure adoption across your organization.


Reauthorizing Claude Code

If the API key becomes invalid or is rotated in Anthropic:

  1. Go to Settings > Company Settings > AI Tools > Claude Code.
  2. Replace the API key.
  3. Click Save.

If disconnected, AI metrics will stop updating until reauthorized.


Troubleshooting

Claude Code shows “Disconnected”

  • Verify the API key is valid.
  • Confirm Admin privileges.
  • Ensure the Git provider is connected and syncing.

AI Metrics Not Appearing

  • Confirm Claude activity occurred within the selected date range.
  • Confirm AI filters are enabled.
  • Allow time for data synchronization.
  • Confirm whether any AI-related bot users are excluded from reporting.
  • Verify whether Claude-generated commits are attributed to a bot user.
  • If bot activity is excluded, contact Support to validate whether this limitation applies to your organization.
  • Review the Known Limitations section below.

Known Limitations

If AI-related bot users are excluded at the database level, Claude-related AI activity attributed to those bot users may not be reflected in AI Insights and AI Analytics dashboards.

This is a known product limitation and not caused by customer misconfiguration. A fix is in progress.


How did we do?

Configuring AI Classification Thresholds

Configuring Cursor

Contact