[BUG] OTEL event/log organization.id doesn't match `~/.claude.json` > `.oauthAccount.organizationUuid`

Resolved 💬 5 comments Opened Jul 24, 2025 by nsheaps Closed Jul 25, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude Code
  • Claude CLI version: 1.0.59
  • Operating System: macos 15.5
  • Terminal: iterm + vscode terminal

Bug Description

When experimenting with otel logging, I tried switching between anthropic console api keys and a personal claude code max 5x subscription. I see the change taking effect in the ~/.claude.json file, but the logs still report as the anthropic console organization ID, even when using my personal claude subscription

Steps to Reproduce

  1. Login through claude subscription, set up OTEL logging, make a request
  2. Note that organization.id doesn't match what's in the json file
  3. Swap to anthropic api key
  4. Note that it now matches

Expected Behavior

Org UUID matches the logged in org, even if the same account (ID'd by uuid) exists in both organization

Actual Behavior

Org ID only is the anthropic org

Additional Context

Discovered while setting up otel logging, and tried to self-correct using OTEL_RESOURCE_ATTRIBUTES, which didn't propagate to logs, but did show correctly in the traces I am manually creating with otel-cli
Related: https://github.com/anthropics/claude-code/issues/4338

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗