Skip to main content

Claude Code

This article explains how to connect Claude Code to Pensero, what AI-assisted coding data is imported, and how Pensero calculates and displays AI usage metrics across your teams.

Written by Wayne

In this article

Overview

Pensero connects to Claude Code to make AI-assisted work visible at team and company level.

AI usage on its own is not the goal. Pensero aligns Claude Code usage with real delivery signals so teams can understand when AI increases output and when it adds defects or rework.

Important: Pensero only processes Claude Code data for users already created in Pensero. Make sure each developer’s company email in Claude Code telemetry matches their email in Pensero. If the user is not in Pensero, their telemetry will be skipped and will not appear in AI Impact.

What Pensero Reads from Claude Code

Pensero ingests Claude Code usage analytics only. It does not access source code.

Pensero retrieves the following information:

  • Total lines added

  • Total lines removed

  • Sessions

  • Commits

  • User identifiers

  • Timestamps for AI events

What Pensero tracks

Pensero tracks Claude Code in the terminal, in your code editor, and in the Code tab of the Claude desktop app.

The Chat and Cowork tabs of the desktop app are not tracked. Work done there does not show in AI impact.

How to connect Claude Code to Pensero

The right setup depends on how your team runs Claude Code.

Prerequisites

Before setting up the integration, make sure you have:

  • Pensero Admin permissions ( Integrations > Claude Code)

  • Access to your organization’s Claude account or Claude Code configuration

Choose your setup path

Pick the option that matches how your team accesses Claude Code today. The path names match exactly what you see when you run /login in Claude Code.

Your team uses Claude Code through API keys or usage-based billing.

Your team uses a Claude Pro, Max, Team, or Enterprise subscription.

Your team uses Claude through Amazon Bedrock, Microsoft Foundry, or Google Vertex AI.

Not sure which applies? If your developers pay per token or use API keys to access Claude Code, choose Path 1. If your company has a Claude Pro, Max, Team or Enterprise subscription, choose Path 2, Team/Enterprise admins can push the config centrally (Option A), Pro/Max users add it themselves from their Pensero profile (Option B). If Claude is hosted in your own AWS or GCP environment, choose Path 3.

Do not mix the paths. With Path 1 (API integration), saving the API token is all you need to do. The OpenTelemetry settings, the organization token and the --check command are only for Path 2 and Path 3. Do not add them for Path 1. The --check command tests telemetry, so it can show failures on Path 1 even when the API integration works.

Path 1: API integration

Use this when your team runs Claude Code through API keys or usage-based billing.

This is the simplest setup. No configuration is pushed to developers.

Step 1 - Open Claude Code in Pensero

Go to Integrations > Claude Code in the Pensero sidebar.

Step 2 - Get your API token from Claude Console

Log in to the Claude Console at console.anthropic.com. You need organization admin access. Copy your API token.

Step 3 Add the token to Pensero and save

Paste the token in Pensero and click Save credentials. Pensero starts reading usage through the analytics integration immediately.

In this setup, Claude reports usage for developers working through API keys. Pensero reads that directly. No action is required from individual developers.

Path 2: OpenTelemetry integration

Use this when your team uses a Claude Pro, Max, Team, or Enterprise subscription.

In this setup, the standard analytics API does not expose everything Pensero needs. OpenTelemetry fills that gap. You configure it once and roll it out to your team.

Important before you start: OpenTelemetry data is not historical. Pensero starts receiving data from the moment telemetry is configured. Past usage is not backfilled automatically (see Troubleshooting for a way to recover recent days).

Already sending Claude Code telemetry to Datadog or Elasticsearch? See Claude Code: send telemetry to Pensero and your monitoring tool.

Step 1 - Open Developer telemetry setup in Pensero

Go to Integrations > Claude Code in Pensero. Find the Developer telemetry setup section and click Generate organization token.

Step 2 - Get the Organization Token

The Configuration block already contains your organization token inside OTEL_EXPORTER_OTLP_HEADERS. This is a shared credential for your whole team. Treat it like a password and share it securely.

Pensero uses this token in the OTLP headers:

"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <organization_token>"

Optional - Collect Claude Code logs

The toggle Collect Claude Code logs (commit attribution and file-edit tracking) lets Pensero attribute commits and file edits to Claude Code sessions. When it is on, the Configuration block gains one extra line:

"OTEL_LOGS_EXPORTER": "otlp",

Decide this before distributing the config: if you toggle it later, developers must copy the updated JSON again (or you must update the Managed settings).

Step 3 - Choose a rollout method and distribute to your team

Copy the Configuration JSON shown in Pensero. It looks like this (the token is already filled in for you):

{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_LOG_TOOL_DETAILS": "1",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://pensero.ai/otel",
"OTEL_METRIC_EXPORT_INTERVAL": "300000",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer tk_XXX:sk_YYY"
}
}

Then pick the rollout method that matches your Claude plan:

If any developer routes Claude Code through Amazon Bedrock, Google Vertex AI, Microsoft Foundry or an LLM gateway, expand Third-party extra setting on the same page and follow Path 3.

OPTION A: MANAGED SETTINGS (Team / Enterprise)

Best for: Teams where you want to push config centrally without asking each developer to set anything up. Requires a Claude Team or Enterprise plan with admin access to claude.ai.

  1. Copy the Configuration JSON from Pensero.

  2. Paste it in Claude.ai under Organization Settings > Products > Claude Code > Managed Settings.

  3. Developers then close their terminal, open a new one and run /login so Claude Code prompts them to accept the managed settings.

Once accepted, telemetry is applied automatically. Managed settings are fetched into ~/.claude/remote-settings.json; /status shows which settings sources are active.

OPTION B: SETTINGS.JSON PER DEVELOPER (Pro / Max / everyone else)

Best for: Developers on individual Claude Pro or Max subscriptions, or organizations that do not distribute Managed settings. Each developer creates their own ~/.claude/settings.json.

Managers do not need to share the token by chat or email. Every developer gets a personalised, ready-to-paste configuration from their own Pensero profile:

  1. Sign in to Pensero and open Profile Settings > Claude Code telemetry.

  2. Copy the entire JSON shown there. It already includes the organization token and your own OTEL_RESOURCE_ATTRIBUTES: enduser.id=<your company email>, so no manual edits are needed.

  3. Paste it into ~/.claude/settings.json, see How to open and edit your settings.json (Mac / Windows).

  4. Follow After every change: close the terminal, open a new one, run /login with your company email, then run --check.

If you prefer to configure it via shell variables instead of settings.json, the same keys can be exported in ~/.zshrc / ~/.bashrc (export CLAUDE_CODE_ENABLE_TELEMETRY=1, …). This is not recommended: settings.json is what the --check tool and Claude Desktop rely on.

Step 4 - Verify the setup

On the machine of a developer with Login enabled in Pensero, run:

macOS / Linux / Git Bash:

curl -fsSL https://pensero.ai/otel/claude/report | sh -s -- --check

Windows (PowerShell):

& ([scriptblock]::Create((irm https://pensero.ai/otel/claude/report.ps1))) --check

It opens a browser for sign-in, reports every setting with its source, then sends a zero-valued test request and confirms Pensero received it. The test request is not counted as usage. The check requires signing in, so it only works for users with Login enabled, telemetry itself is collected for every developer using the configuration, regardless of login access.

Path 3: 3rd-party platform

Use this when your team is not using a Claude Code subscription. This includes Amazon Bedrock, Microsoft Foundry, Google Vertex AI, LiteLLM, and any other third-party backend.

These platforms do not send the user email in telemetry events by default. Pensero receives the usage data. But without an extra step, it cannot tell which developer the data belongs to.

There are two ways to fix this. Choose the one that matches your setup.

Option A: Centralized rollout via Managed settings (recommended)

Use this only if your team uses a Claude Code subscription AND routes traffic through a 3rd-party backend such as Bedrock or Vertex AI behind it. This is an advanced setup. Most teams on Bedrock, Vertex AI, or LiteLLM will not have access to Managed settings and should use Option B instead.

This approach uses a Claude Code session hook to automatically populate each developer's email from their git config. No manual step is required from individual developers.

Add the following to your Claude Code Managed settings in claude.ai. Pick the config that matches your backend.

Bedrock

{
"env": {
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "global.anthropic.claude-haiku-4-5-20251001-v1:0",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "us.anthropic.claude-opus-4-6-v1",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "global.anthropic.claude-sonnet-4-5-20250929-v1:0",
"AWS_BEARER_TOKEN_BEDROCK": "xx=",
"AWS_REGION": "us-east-1",
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"CLAUDE_CODE_USE_BEDROCK": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://pensero.ai/otel",
"OTEL_METRIC_EXPORT_INTERVAL": "300000",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <organization_token>"
},
"hooks": {
"SessionStart": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash -c '(EMAIL=$(git config user.email) && echo \"{\\\"env\\\":{\\\"OTEL_RESOURCE_ATTRIBUTES\\\":\\\"enduser.id=$EMAIL\\\"}}\" > ~/.claude/settings.json)'"
}
]
}
]
}
}

Update before pasting: AWS_BEARER_TOKEN_BEDROCK (your AWS bearer token), AWS_REGION (your AWS region), OTEL_EXPORTER_OTLP_HEADERS (your Pensero org token). The inline // comments and trailing commas were removed so the block is valid JSON.

Vertex AI

{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"CLAUDE_CODE_USE_VERTEX": "1",
"ANTHROPIC_VERTEX_PROJECT_ID": "your-gcp-project-id",
"CLOUD_ML_REGION": "global",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-7",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5@20251001",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://pensero.ai/otel",
"OTEL_METRIC_EXPORT_INTERVAL": "300000",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <organization_token>"
},
"hooks": {
"SessionStart": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash -c '(EMAIL=$(git config user.email) && echo \"{\\\"env\\\":{\\\"OTEL_RESOURCE_ATTRIBUTES\\\":\\\"enduser.id=$EMAIL\\\"}}\" > ~/.claude/settings.json)'"
}
]
}
]
}
}

Update before pasting: ANTHROPIC_VERTEX_PROJECT_ID (your GCP project ID), OTEL_EXPORTER_OTLP_HEADERS (your Pensero org token).

The SessionStart hook reads each developer's git email automatically at the start of every Claude Code session. It writes it as OTEL_RESOURCE_ATTRIBUTES in their local settings. Pensero uses this to map events to the correct developer. No manual input is needed from the team.

Developers still need to restart their terminal and run /login once so the managed settings are fetched.

Option B: Per-developer manual setup (most common for Bedrock, Vertex AI, and LiteLLM)

Use this when your team does not have a Claude Code subscription.

Step 1: Each engineer opens their Pensero Profile Settings > Claude Code telemetry and copies the personalised JSON. It already contains the organization token and OTEL_RESOURCE_ATTRIBUTES with their own company email — no edits needed.

If a developer has no Pensero login, the manager shares the JSON below with OTEL_EXPORTER_OTLP_HEADERS updated with the Pensero token, and the engineer replaces the email with their own.

Step 2: Each developer adds it to ~/.claude/settings.json:

{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_LOG_TOOL_DETAILS": "1",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://pensero.ai/otel",
"OTEL_METRIC_EXPORT_INTERVAL": "300000",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <organization_token>",
"OTEL_RESOURCE_ATTRIBUTES": "[email protected]"
}
}
  • Update OTEL_EXPORTER_OTLP_HEADERS with the value provided in Pensero. The format should look similar to: tk_...:sk...

  • Replace [email protected] with the developer's actual company email. This must match the email configured in Pensero.

Step 3: Each engineer saves the file and follows After every change (close the terminal, open a new one, /login, run --check).

Without this step: Claude Code sends only an anonymous installation ID in telemetry. Pensero receives the usage events but cannot map them to individual developers. AI adoption metrics will be incomplete.

How to open and edit your settings.json

Before you start, open Claude Code in your Terminal and make sure you are logged in with your company email.

  • If you see a personal email instead, run /login and switch to your company account before continuing.

On Mac

Run:

open -a TextEdit ~/.claude/settings.json

Paste the Pensero config. Save with Command + S. Then follow After every change.

Verify it worked:

cat ~/.claude/settings.json

On Windows

PowerShell:

notepad $env:USERPROFILE\.claude\settings.json

Command Prompt:

notepad %USERPROFILE%\.claude\settings.json

Paste the Pensero config. Save with Ctrl + S. Then follow After every change.

Verify it worked (PowerShell / Command Prompt):

Get-Content $env:USERPROFILE\.claude\settings.json type %USERPROFILE%\.claude\settings.json

Additional step: Claude Desktop and third-party providers

Complete this section after following your selected Claude Code setup path if either of the following applies:

  • You use the Claude Desktop app, in addition to or instead of Claude Code in the terminal.

  • Claude Code is routed through a third-party provider, such as Amazon Bedrock, Google Vertex AI, Microsoft Foundry, or a custom endpoint/LLM gateway.

This step may also be required if the --check command reports an identity or OTEL_RESOURCE_ATTRIBUTES warning after completing your initial configuration.

Claude Desktop setup

Claude Desktop does not read OTEL_RESOURCE_ATTRIBUTES from ~/.claude/settings.json. Instead, it reads this value from the user’s shell or system environment. Quit and open Claude Code again after you add it.

Each developer must therefore configure their company email as an environment variable so Pensero can attribute Claude telemetry to the correct Pensero user.

Important: The email in OTEL_RESOURCE_ATTRIBUTES must match the developer’s email in Pensero.

macOS

Add the following variable to your shell profile, usually ~/.zshrc or ~/.bash_profile:

export OTEL_RESOURCE_ATTRIBUTES="[email protected]"

Replace [email protected] with the developer’s company email.

Alternatively, you can populate it automatically from the developer’s git email:

EMAIL=$(git config user.email); grep -q OTEL_RESOURCE_ATTRIBUTES ~/.zshrc || echo "export OTEL_RESOURCE_ATTRIBUTES=\"enduser.id=$EMAIL\"" >> ~/.zshrc

After saving the file, fully restart Claude Desktop so the app picks up the new environment variable.

Windows

Set a persistent user environment variable:

setx OTEL_RESOURCE_ATTRIBUTES "[email protected]"

Replace [email protected] with the developer’s company email.

After setting the variable, sign out and back in, then fully restart Claude Desktop so the app inherits the updated environment.

Why this is required

Without OTEL_RESOURCE_ATTRIBUTES, Claude telemetry may only include an anonymous installation ID. Pensero can still receive usage events, but it cannot reliably map them to the correct developer.

Once this value is configured and Claude Desktop is restarted, Pensero can associate Claude usage with the right user in AI Impact.

Using Claude Code with more than one plan

You may use a Team or Enterprise seat alongside personal Pro or Max, or belong to two Claude organizations. Server-managed settings are delivered to members of the organization that configured them. Switching accounts can change which settings Claude Code uses, but it does not always stop telemetry: ~/.claude/settings.json is shared by the same user on the same computer, not separate for each plan.

To check each account on each computer:

1. In Claude Code, use /logout if switching accounts, then /login with the intended account. Run /status to confirm the login and active settings source.

2. Run the Pensero diagnostic on that computer. Sign in to Pensero with your work account when prompted (your Pensero email can differ from your Claude login):

  • macOS, Linux, or Git Bash:

    sh curl -fsSL https://pensero.ai/otel/claude/report | sh -s -- --check

  • Windows PowerShell:

    powershell & ([scriptblock]::Create((irm https://pensero.ai/otel/claude/report.ps1))) --check

3. If the check identifies missing or incorrect user settings, copy your personalised JSON from Pensero Profile Settings → Claude Code telemetry. Merge its env values into your existing ~/.claude/settings.json; preserve your other settings. Open the file on Mac with open -a TextEdit ~/.claude/settings.json, or in Windows PowerShell with notepad $env:USERPROFILE\.claude\settings.json. If the check identifies settings you cannot change on your computer, send its redacted output to Pensero support.

4. Restart Claude Code and the terminal, then repeat /status and --check for each login and computer. The check sends a zero-valued probe, not usage. Confirm that new real activity appears under the right person in Pensero.

If data is missing for earlier days, compare local transcripts without uploading:

sh curl -fsSL https://pensero.ai/otel/claude/report | sh -s -- --report

Windows PowerShell:

powershell & ([scriptblock]::Create((irm https://pensero.ai/otel/claude/report.ps1))) --report --no-upload

The report includes all locally stored Claude Code transcripts on that computer, without separating plans. If personal and work activity are mixed or history is incomplete, contact Pensero support before uploading. If the history is complete and only intended usage is included, run --report interactively and review the proposed days before confirming; do not use --yes.

Do not share your Pensero organization token, settings JSON, or screenshots containing credentials with support.

After every change: restart, /login, verify

Do this every time you or your organization change the Claude Code telemetry configuration (settings.json, Managed settings, token regeneration, logs toggle, environment variables):

  1. Close the terminal completely and open a new one. Claude Code reads telemetry settings only at startup — a running session keeps the old values.

  2. Start Claude Code and run /login. Sign in with your company email (the one registered in Pensero). If your organization uses Managed settings, this also refreshes ~/.claude/remote-settings.json.

  3. Optional: run /status to see which settings sources are active.

  4. Verify (requires Login enabled in Pensero; opens your browser to sign in the first time):

    • macOS / Linux / Git Bash:

    curl -fsSL https://pensero.ai/otel/claude/report | sh -s -- --check
    • Windows (PowerShell):

    & ([scriptblock]::Create((irm https://pensero.ai/otel/claude/report.ps1))) --check

  5. Every line should show PASS. If you see WARN or FAIL, go to Troubleshooting --check issues.

Data Availability

Once telemetry is configured, Pensero starts receiving Claude Code usage data from that point forward.

Historical data is not available through the OpenTelemetry setup. Pensero does not backfill Claude Code telemetry from before the integration was enabled, unless the developer runs the backfill report described in Troubleshooting (it can recover roughly the last 30 days from their computer).

Troubleshooting: When Your Numbers Don't Match

Sometimes the usage numbers you see in Pensero may not match your real Claude Code activity.

This usually means Claude Code stopped sending telemetry from your computer for some days. You can fix it yourself in two steps: Step 1 repairs the past, Step 2 makes sure it does not happen again. Both steps are needed.

Before you start

  • Run the commands below in the same terminal and project folder you normally use Claude Code from. The check looks at that exact setup.

  • On Windows, use the PowerShell command shown under each step. If you prefer Git Bash or WSL, use the curl command instead.

  • If you use Claude Code on more than one computer, repeat the steps on each one.

  • If your organization uses Claude Code Managed Settings, make sure you are also signed in to Claude Code using /login. This allows Claude Code to fetch your organization's configuration into ~/.claude/remote-settings.json. After signing in, restart Claude Code

Step 1: Compare and backfill your Claude Code activity

Open a terminal and paste in this command:

curl -fsSL https://pensero.ai/otel/claude/report | sh -s -- --report

Windows (PowerShell):

& ([scriptblock]::Create((irm https://pensero.ai/otel/claude/report.ps1))) --report

Here's what happens when you run it:

  1. You sign in. Your browser opens so you can log in to Pensero. This only happens the first time; after that, it remembers you.

  2. It shows you a comparison. It reads your own Claude Code history from your computer and lists your usage day by day, next to what Pensero currently shows. Days marked missing in Pensero were never received; days marked sides disagree were received only partially.

  3. It asks before changing anything. It shows exactly which days it plans to send and waits for you to type y and press Enter. Once you confirm, it updates those days in Pensero so they match your actual usage.

After you confirm, your numbers in Pensero should line up.

Good to know:

  • Claude Code only keeps your history on your computer for about 30 days, so older days cannot be recovered.

  • If you recently deleted or reinstalled your Claude Code folder (~/.claude), do not confirm the upload: the report would lower those days to the little that is left on your computer. Contact us instead.

Step 2: Check your setup so it does not happen again

This is the important step. Run:

curl -fsSL https://pensero.ai/otel/claude/report | sh -s -- --check

Windows (PowerShell):

& ([scriptblock]::Create((irm https://pensero.ai/otel/claude/report.ps1))) --check

The check:

  • Reviews your Claude Code telemetry configuration.

  • Shows each setting and where it comes from.

  • Sends a zero-valued test request to Pensero.

  • Confirms that Pensero successfully receives the test under your account.

  • Does not count the test request as AI usage.

If everything is configured correctly, the checks should show PASS and your telemetry should continue flowing automatically. You do not need to run the report every day.

If you see WARN or FAIL, use the message shown in the terminal to identify the configuration that needs attention. Common causes include:

  • Missing or incorrect OTEL_EXPORTER_OTLP_HEADERS.

  • Missing telemetry configuration.

  • Managed Settings not being loaded because the developer has not run /login in Claude Code.

  • Missing OTEL_RESOURCE_ATTRIBUTES when using the Claude Desktop app.

  • The script cannot reach pensero.ai (SSL / proxy error) — see Scenario 5.

Troubleshooting --check issues

This section is specifically for engineers without Admin permissions who need to review or troubleshoot their Claude Code telemetry setup.

If the --check command shows WARN or FAIL, identify the scenario that matches your results below and follow the corresponding instructions.

Scenario 1: All telemetry checks fail

If the --check command shows FAIL for all or almost all telemetry settings, Claude Code telemetry is likely not configured correctly, and usage data may not be sent to Pensero.

  • Go to your Pensero account settings. and find the Claude Code telemetry configuration. Copy the entire JSON configuration shown there. It already includes the credentials required to send telemetry to Pensero.

  • Open your Claude Code settings:

    • Mac: open -a TextEdit ~/.claude/settings.json

    • Windows: notepad $env:USERPROFILE\.claude\settings.json

  • Paste the full JSON configuration from Pensero into your Claude Code settings.

  • Close the terminal, open a new one, start Claude Code and run /login with your company email (After every change).

  • Run the check again (curl -fsSL https://pensero.ai/otel/claude/report | sh -s -- --check or the PowerShell command & ([scriptblock]::Create((irm https://pensero.ai/otel/claude/report.ps1))) --check

  • Confirm that all telemetry checks now show PASS.

Scenario 2: OTEL_EXPORTER_OTLP_HEADERS is missing

If the --check command shows that OTEL_EXPORTER_OTLP_HEADERS is not set, Pensero cannot authenticate the telemetry sent by Claude Code.

  • Open your Claude Code settings at ~/.claude/settings.json.

  • Add:

    • "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer tk_...:sk_..."

  • Get your tk_ and sk_ values from your Pensero account settings.

  • Close the terminal, open a new one, start Claude Code and run /login (After every change).

  • Run the check again and confirm that all checks show PASS.

Scenario 3: Your organization uses Claude Code Managed Settings

If your organization distributes the Claude Code configuration through Managed Settings instead of each developer maintaining ~/.claude/settings.json, each developer must still be signed in to Claude Code.

  • Close the terminal and open a new one, then open Claude Code.

  • Run /login and sign in with your company email.

  • This allows Claude Code to fetch the organization’s managed configuration into ~/.claude/remote-settings.json.

  • Restart Claude Code after signing in because telemetry settings are read at startup.

  • You can run /status to confirm which settings sources are currently active.

  • Run the --check command again to verify the configuration.

Scenario 4: OTEL_RESOURCE_ATTRIBUTES warning or Claude Desktop activity is missing

If --check shows a warning for OTEL_RESOURCE_ATTRIBUTES, you may not need to fix it in every case.

You can skip this warning if:

  • You only use Claude Code via CLI/terminal, and

  • Claude Code connects directly to the Anthropic API.

Do not skip this step if:

  • You use the Claude Desktop app, or

  • Claude Code is routed through a third-party provider, such as Amazon Bedrock, Google Vertex AI, Microsoft Foundry, or a custom endpoint/LLM gateway.

In these cases, configure OTEL_RESOURCE_ATTRIBUTES so Pensero can attribute the telemetry to the correct user.

Claude Desktop

Claude Desktop reads OTEL_RESOURCE_ATTRIBUTES from the shell/system environment, not from settings.json. Add your enduser.id to your shell environment.

  • macOS: Add to ~/.zshrc:
    ​export OTEL_RESOURCE_ATTRIBUTES="[email protected]"

    Then fully restart Claude Desktop.

  • Windows: Run:
    ​setx OTEL_RESOURCE_ATTRIBUTES "[email protected]"

    Then sign out and back in and restart Claude Desktop.

Important: enduser.id must use the email associated with your Pensero account.

Scenario 4: Cannot reach pensero.ai … [SSL: CERTIFICATE_VERIFY_FAILED]"

Symptom — running --report or --check stops with an error like or the check prints "TLS handshake failed, typically corporate TLS interception".

Cannot reach https://pensero.ai/api/v1/mcp/oauth/register: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)

What it means: the script could not open a trusted HTTPS connection to pensero.ai. This is a network / security setting on your company's side, not a problem with your Claude Code configuration. The usual causes are:

  • Your organization's security tooling blocks or rewrites connections to pensero.ai (web filter, Zero-Trust agent, Zscaler / Netskope-type proxy), or blocks scripts downloaded with curl | sh / irm as a policy.

  • You are behind a corporate proxy that intercepts TLS and re-signs traffic with the company's own root certificate. The check runs on Python, which does not read the system keychain, so it does not trust that certificate.

What to do

  1. Escalate to your IT / Security team with the error message. Ask them to allow-list https://pensero.ai (in particular pensero.ai/otel, pensero.ai/otel/claude/report and pensero.ai/api/v1/) in the proxy / web filter, and to confirm whether TLS inspection applies to that domain.

  2. If TLS is intercepted and cannot be bypassed, ask IT for the company root certificate (.pem) and point the tools at it:

    • macOS / Linux, before re-running the check:

      export SSL_CERT_FILE=/path/to/company-root-ca.pem

    • Windows PowerShell, before re-running the check: $env:SSL_CERT_FILE="C:\path\to\company-root-ca.pem"

    • For Claude Code telemetry itself, add to the env block of settings.json: "NODE_EXTRA_CA_CERTS": "/path/to/company-root-ca.pem"

  3. Once your IT team has reviewed it, contact us at [email protected]. We will work with your security team to get Pensero allow-listed (domains, endpoints and script details) so both the check and the telemetry go through.

Telemetry sent by Claude Code is likely blocked by the same proxy, even if you skip the check. Allow-listing pensero.ai is required for data to reach Pensero.

If the check still fails, or your numbers still don't match, contact us at [email protected] and paste the output of the --check command. It is safe to share: it never shows passwords or full tokens.

FAQs

Does OpenCode work with Pensero the same way Claude Code does?
No. OpenCode is not officially supported. It has no built-in telemetry like Claude Code.

What happens if I connect OpenCode anyway?
Pensero receives sessions, token counts, cost, and per-model usage, but no lines of code. OpenCode stopped sharing edit diffs in recent updates (V1 ≥1.16 sends an empty diff, V2 removed it completely), so Pensero shows 0 lines added/removed.

What does "third-party" mean in the Claude Code skills card?
The AI-assisted page shows Claude Code spend per skill in the Skills card (Beta). It shows the top 8 skills and groups the rest as "Other".

Claude Code hides the names of skills that come from plugins that are not official. It sends them as third-party, so Pensero shows them as third-party.

To see each skill of your own plugins by name:

  • Make sure the env block of your Claude Code Managed settings (or each developer's settings file) has "OTEL_LOG_TOOL_DETAILS": "1". The Pensero setup snippet includes it. If you set up Claude Code before October 2026, add it.

  • Make sure all developers use Claude Code 2.1.273 or later.

This setting also adds more detail to the telemetry that Claude Code sends (commands, file paths and tool names). Pensero does not store commands. New data shows the real skill name. Data from before the change stays as third-party.

Step by step guide: Understanding AI Economics > See your own skills by name.

Did this answer your question?