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 across your engineering organization.


Current Integration Method

Claude Code is currently connected to LinearB using an Admin-level API token from Anthropic.

This token allows LinearB to retrieve organization-level Claude usage data and associate it with Git activity.

Important:
Anthropic API keys do not support fine-grained scopes. An Admin-level API key is required to enable data ingestion.

Historical Data & Backfill

  • Up to 90 days of historical Claude usage data is backfilled on initial connection.
  • Activity prior to this window will not appear in AI Analytics or AI Insights.
  • After initial connection, Claude usage data is updated daily.

Supported Environments

  • Supported: Anthropic direct API (Claude Code)
  • Not supported: AWS Bedrock Claude integrations

Claude Code API usage is independent of the Anthropic Console UI. LinearB retrieves data directly from the API and does not rely on dashboard-level reporting from the Anthropic interface.


Before You Begin

  • LinearB role: Company Admin
  • Anthropic access: Organization Admin
  • An Admin-level Anthropic API key

Step 1 — Generate an Anthropic Admin 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. Store the key securely. It will not be shown again.

Step 2 — Connect Claude Code in LinearB

  1. Go to Settings → Company Settings → AI Tools → Claude Code.
  2. Paste the API key into the Token (Admin access required) field.
  3. Click Save.

Once connected, the integration status will display Connected along with the last update timestamp.


What Data Is Ingested

LinearB retrieves daily Claude usage data at the user level and correlates it with Git activity.

This data is used to analyze:

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

Claude activity is matched to commits and pull requests to determine where AI-assisted development occurred.


How AI-Assisted Work Is Calculated

AI-Assisted Lines

  • A line is considered AI-assisted if it is reported as accepted AI-generated code via the Claude API, or
  • It appears in a commit identified as AI-assisted through co-author or attribution signals.

Daily AI Classification

For each user:

AI-assisted lines committed (per day)
÷
Total lines committed (per day)

If more than 50% of committed lines are AI-assisted, all commits from that user on that day are classified as AI-assisted.

PR-Level AI Classification

A pull request is classified as AI-assisted if it contains at least one AI-assisted commit.

% Code Done AI-Assisted (User-Level)

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

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


Metric Availability for Claude

Claude does not provide suggestion-level telemetry.

  • Acceptance Rate is not available
  • Suggestion-level metrics are not exposed via the Claude API

Claude metrics are derived from code contribution and usage data, not individual suggestion acceptance events.


Where Claude Data Appears

  • AI Active Users
  • AI Adoption Rate
  • AI Coding Activity
  • AI Actions
  • AI grouping under Coding Assistance
  • AI Analytics Dashboard
  • AI Insights Dashboard
  • AI-filtered metrics across the Metrics area

Reauthorizing Claude Code

If the API key is rotated, revoked, or expires:

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

If the integration becomes disconnected, AI metrics will stop updating until a valid key is provided.


Troubleshooting

Claude Code shows “Disconnected”

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

AI Metrics Not Appearing

  • Confirm Claude activity occurred within the selected time range.
  • Allow time for daily data synchronization.
  • Verify AI filters are applied in dashboards.
  • Check whether AI-related bot users are excluded.

Known Limitations

  • Claude data is updated on a daily cadence, not in real time.
  • Claude does not provide suggestion-level acceptance data.
  • If AI-related bot users are excluded at the database level, associated activity may not appear in dashboards.

How did we do?

Configuring AI Classification Thresholds

Configuring Cursor

Contact