Skip to main content

Configuring Claude Code in LinearB

Overview. LinearB supports integration 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…

Steven Silverstone
Updated by Steven Silverstone

Overview

LinearB supports integration 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.

Before You Begin

Make sure you have:

  • Admin access in LinearB
  • 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.

If the key is rotated or revoked, you will need to update it in LinearB.

Step 2 — Connect Claude Code in LinearB
  1. Navigate 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.

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 cod, not PR count.

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
  • Review the Known Limitations section below

Known Limitations

A known release limitation related to user-specific bot configuration may result in some Claude-related AI not being fully reflected in AI Insights and AI Analytics.

This is not caused by customer misconfiguration. A fix is in progress.

How did we do?

AI Tools Usage

Configuring Cursor

Contact