cd /news/ai-tools/telemetry-report-claude-code-v2-1-14… · home topics ai-tools article
[ARTICLE · art-34587] src=gist.github.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Telemetry Report -- Claude Code v2.1.143

An analysis of Claude Code v2.1.143 reveals that the AI coding assistant sends telemetry metrics to Anthropic every five minutes via HTTP POST, with data including API usage, OAuth events, and system attributes. The telemetry system is enabled by default for first-party deployments unless blocked by specific environment variables, and it exports over 950 unique event types. Trust gates and organization settings are checked before each export to ensure compliance.

read10 min views1 publishedJun 20, 2026

Telemetry Report -- Claude Code v2.1.143 Source: deobfuscated_clean.js

(14.5MB, 19,592 lines, Bun CJS bundle) Date: 2026-06-20

https://api.anthropic.com/api/claude_code/metrics

(HTTP POST, JSON, 5s timeout)

Periodic: Every 5 minutes via PeriodicExportingMetricReader

On shutdown: forceFlush()

before process exit (2s timeout) Startup perf: Single event at startup (or late startup), sampled at 0.5% The metrics reader is added to the MeterProvider during app startup in Bx_()

. It is always added for first-party deployments unless blocked by env vars. The CLAUDE_CODE_ENABLE_TELEMETRY

env var only controls the event logger (logs/traces), not the metric s reader.

$V7() = !Wq$() && (PmH() || (Hq() && subscription in ["enterprise", "team"]))

Condition Effect tYq() !== "default"

Metrics disabled Not first-party + not enterprise/team Metrics disabled First-party + not sandboxed + trusted Metrics enabled First-party + trusted + enterprise/team Metrics enabled

Variable Effect Values CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC

Disables metrics Any truthy value DISABLE_TELEMETRY

Disables metrics Any truthy value DO_NOT_TRACK

Disables metrics "1"

, "true"

, "yes"

, "on"

CLAUDE_CODE_ENABLE_TELEMETRY

Controls event logger only (NOT metrics) "1"

, "true"

, "yes"

, "on"

CLAUDE_CODE_PROFILE_STARTUP

Forces startup perf sampling Any truthy value CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS

Shutdown flush timeout Number (default: 2000ms) OTEL_LOGS_EXPORT_INTERVAL

Log export interval Number (default: SDK default) OTEL_EXPORTER_OTLP_METRICS_PROTOCOL

Metrics transport "http/json"

or "http/protobuf"

Trust Gates (per-export check) Before each export, the following must all pass:

Trust established (Hq()

-- sandboxed or authenticated) Not in a restricted state (!yT()

) Org settings don't disable it (uJ7().enabled

) -- checked every 24 hours Resource attributes:

service.name

= "claude-code" service.version

= "2.1.143" os.type

(e.g., "linux", "darwin", "win32") os.version

host.arch

(e.g., "x64", "arm64") wsl.version

(if running under WSL) user.customer_type

= "claude_ai" or "api" user.subscription_type

= "free", "plus", "team", "enterprise", etc. Metric data points:

name

-- event name (e.g., "tengu_git_operation") description

-- human-readable description unit

-- measurement unit value

-- numeric value attributes

-- key-value pairs from the event timestamp

-- ISO 8601 format Telemetry Events: 954 unique, 1,330 total calls All event names are prefixed with tengu_

. Events fire on specific actions, not on a timer (except the periodic export of accumula ted data).

API (16 events, 17 calls) Event Data tengu_api_529_background_dropped

Background request dropped due to 529 tengu_api_after_normalize

Post-normalization state tengu_api_before_normalize

Pre-normalization state tengu_api_cache_breakpoints

Cache breakpoint info tengu_api_custom_529_overloaded_error

529 overloaded response tengu_api_error

API error details tengu_api_key_keychain_error

Keychain access failure tengu_api_key_saved_to_config

API key persisted to config tengu_api_key_saved_to_keychain

API key persisted to keychain tengu_api_opus_fallback_triggered

Opus fallback activated tengu_api_persistent_retry_wait

Long retry wait tengu_api_query

API request metadata tengu_api_retry

Retry attempt tengu_api_retry_after_too_long

Retry-After header exceeded tengu_api_slow_first_byte

Slow TTFB tengu_api_success

Successful API response (x2)

OAuth (45 events, 57 calls) Event Data tengu_oauth_401_recovered_from_disk

Token recovered from disk tengu_oauth_401_recovered_from_keychain

Token recovered from keychain tengu_oauth_401_sdk_callback_refreshed

SDK callback refresh tengu_oauth_api_key

API key auth success/failure, status code tengu_oauth_auth_code_received

OAuth auth code tengu_oauth_automatic_redirect

Auto-redirect (x2) tengu_oauth_automatic_redirect_error

Redirect error tengu_oauth_bedrock_wizard_launched

Bedrock auth wizard tengu_oauth_claudeai_forced

Forced Claude.ai auth tengu_oauth_claudeai_selected

Claude.ai selected tengu_oauth_env_var_api_key

Env var API key detected tengu_oauth_fallback_to_api_key

Fallback to API key tengu_oauth_foundry_wizard_launched

Foundry auth wizard tengu_oauth_github_oauth_flow

GitHub OAuth tengu_oauth_iam_role_prompted

IAM role prompt tengu_oauth_keychain_error

Keychain error tengu_oauth_keychain_success

Keychain success tengu_oauth_login_success

Login success tengu_oauth_mfa_required

MFA required tengu_oauth_org_selection

Org selection tengu_oauth_org_sso

SSO org tengu_oauth_profile_fetch_success

Profile fetch tengu_oauth_roles_stored

org_role

tengu_oauth_sso_login

SSO login tengu_oauth_token_exchange_success

Token exchange tengu_oauth_token_refresh_failure

error

tengu_oauth_token_refresh_success

Token refresh ... and 19 more Bedrock, Foundry, Vertex, WIF flows

MCP (43 events, 65 calls) Event Data tengu_mcp_add

MCP config added (x3) tengu_mcp_auth_config_authenticate

Auth config tengu_mcp_auth_config_clear

Auth cleared tengu_mcp_channel_enable

Channel enabled tengu_mcp_channel_flags

Channel flags tengu_mcp_channel_gate

Channel gate tengu_mcp_channel_message

Channel message (x3) tengu_mcp_claudeai_proxy_401

Proxy 401 (x2) tengu_mcp_degraded

MCP degraded (x2) tengu_mcp_delete

MCP config deleted (x2) ... and 33 more Config load, transport, tool calls, errors

ToolUse (23 events, 29 calls) Event Data tengu_tool_empty_result

Empty tool result tengu_tool_input_json_parse_fail

JSON parse failure tengu_tool_result_pairing_repaired

Result pairing fixed tengu_tool_result_persisted

Result persisted tengu_tool_result_persisted_message_budget

Budget exceeded tengu_tool_search_mcp_wait

MCP search wait tengu_tool_search_mode_decision

Search mode decision tengu_tool_search_outcome

Search result tengu_tool_use_can_use_tool_allowed

Tool allowed tengu_tool_use_can_use_tool_rejected

Tool rejected ... and 13 more Tool execution, timeouts, errors

File (21 events, 33 calls) Event Data tengu_file_changed

File changed tengu_file_history_backup_deleted_file

Backup of deleted file tengu_file_history_backup_file_created

Backup file created tengu_file_history_backup_file_failed

Backup failed tengu_file_history_resume_copy_failed

Resume copy failed tengu_file_history_rewind_failed

Rewind failed (x2) tengu_file_history_rewind_restore_file_failed

Restore failed (x5) tengu_file_history_rewind_success

Rewind success tengu_file_history_snapshot_failed

Snapshot failed tengu_file_history_snapshot_success

Snapshot success ... and 11 more File reads, writes, changes, watch events

Session (14 events, 39 calls) Event Data tengu_session_all_projects_toggled

All projects toggle tengu_session_branch_filter_toggled

Branch filter toggle tengu_session_file_read

File read event tengu_session_forked_branches_fetched

Forked branches tengu_session_group_expanded

Group expanded tengu_session_linked_to_pr

PR linking tengu_session_persistence_failed

Persistence failed (x2) tengu_session_preview_opened

Preview opened tengu_session_rename_started

Rename started tengu_session_renamed

Rename completed ... and 4 more Session switch, close, new, load

Agent (15 events, 21 calls) Event Data tengu_agent_color_set

Agent color tengu_agent_created

Agent created tengu_agent_definition_generated

Definition generated tengu_agent_flag

Agent flag tengu_agent_memory_loaded

Memory loaded (x3) tengu_agent_name_set

Agent name tengu_agent_parse_error

Definition parse error tengu_agent_stop_hook_blocking

Stop hook blocking tengu_agent_stop_hook_error

Stop hook error (x2) tengu_agent_stop_hook_max_turns

Max turns reached tengu_agent_stop_hook_success

Stop hook success tengu_agent_summary_skipped

Summary skipped tengu_agent_tool_completed

Tool completed tengu_agent_tool_selected

Tool selected tengu_agent_tool_terminated

Tool terminated (x4)

Plugin (26 events, 28 calls) Event Data tengu_plugin_command_failed

Plugin command failed tengu_plugin_details_command

Plugin details tengu_plugin_disable_command

Disable command (x2) tengu_plugin_disabled_all_cli

Disabled all tengu_plugin_disabled_cli

Disabled single tengu_plugin_enable_command

Enable command tengu_plugin_enabled_cli

Enabled single tengu_plugin_enabled_for_session

Session enable tengu_plugin_folder_shadowed

Folder shadowed tengu_plugin_hint_detected

Hint detected ... and 16 more Install, load, error, config, reload

Config (7 events, 18 calls) Event Data tengu_config_auth_loss_prevented

Auth loss prevented (x4) tengu_config_cache_stats

Cache stats tengu_config_changed

Config changed (x9) tengu_config_lock_contention

Lock contention tengu_config_model_changed

Model changed tengu_config_parse_error

Parse error tengu_config_stale_write

Stale write

Shell (5 events, 6 calls) Event Data tengu_shell_completion_failed

Command failed tengu_shell_set_cwd

Working directory changed (x2) tengu_shell_snapshot_error

Snapshot error tengu_shell_snapshot_failed

Snapshot failed tengu_shell_unknown_error

Unknown error

Permission (2 events, 5 calls) Event Data tengu_permission_request_escape

Escape attempt (x3) tengu_permission_request_option_selected

User's choice

Model (8 events, 10 calls) Event Data tengu_model_command_inline

Inline model change (x2) tengu_model_command_inline_help

Inline help (x1) tengu_model_command_menu

Menu model change (x2) tengu_model_command_menu_effort

Effort setting tengu_model_fallback_triggered

Model fallback tengu_model_picker_hotkey

Hotkey picker tengu_model_response_keyword_detected

Keyword in response tengu_model_whitespace_response

Whitespace-only response

Input (5 events, 9 calls) Event Data tengu_input_bash

Bash input tengu_input_command

Command input (x2) tengu_input_prompt

Prompt input (x2) tengu_input_slash_invalid

Invalid slash command (x3) tengu_input_slash_missing

Missing slash

Daemon (10 events, 11 calls) Event Data tengu_daemon_config_reload

Config reloaded tengu_daemon_idle_exit

Idle exit tengu_daemon_lease

Lease (x2) tengu_daemon_peer_uid_reject

UID rejected tengu_daemon_self_restart_on_upgrade

Self-restart tengu_daemon_start

Daemon start tengu_daemon_worker_crash

Worker crash tengu_daemon_worker_permanent_exit

Permanent exit tengu_daemon_yield

Yield tengu_daemon_yield_takeover

Yield takeover

FeatureFlags (3 events, 3 calls) Event Data tengu_feature_bad

feature_name

, error_code

, additional data tengu_feature_ok

feature_name

tengu_feature_sad

feature_name

, error_code

FastMode (4 events, 5 calls) Event Data tengu_fast_mode_fallback_triggered

cooldown_duration_ms

, cooldown_reason

tengu_fast_mode_overage_rejected

overage_disabled_reason

tengu_fast_mode_picker_shown

Picker displayed tengu_fast_mode_toggled

Toggle (x2)

Feedback (3 events, 12 calls) Event Data tengu_accept_feedback_mode_collapsed

Mode collapsed (x4) tengu_accept_feedback_mode_entered

Mode entered (x4) tengu_accept_submitted

Feedback submitted (x4)

AskUserQuestion (4 events, 4 calls) Event Data tengu_ask_user_question_accepted

Question accepted tengu_ask_user_question_finish_plan_interview

Plan interview finished tengu_ask_user_question_rejected

Question rejected tengu_ask_user_question_respond_to_claude

Responded to Claude

Event Data tengu_git_index_lock_error

Lock error tengu_git_operation

Git operation (x7)

Prompt (4 events, 12 calls) Event Data tengu_prompt_cache_break

Cache broken tengu_prompt_cache_diagnosis_received

Diagnosis received tengu_prompt_suggestion

Suggestion (x4) tengu_prompt_suggestion_init

Suggestion init (x6)

Event Data tengu_rate_limit_lever_hint

Rate limit hint tengu_rate_limit_options_menu_cancel

Cancelled tengu_rate_limit_options_menu_select_extra_usage

Extra usage tengu_rate_limit_options_menu_select_team

Team plan tengu_rate_limit_options_menu_select_upgrade

Upgrade

Startup (3 events, 3 calls) Event Data tengu_startup_manual_model_config

Manual model config tengu_startup_perf

import_time

, main_imports

, init_time

, settings_time

, tools_loaded

, mcp_configs

, plugins_init

, headless_setup

, force_login_org

, mcp_connect

, mcp_connect_user

, mcp_connect_connector

, growthbook_init

, prewait

, s andbox_init, `

process_user_input,

total_time,

gap_unaccounted_ms,

free_mem_mb,

load_avg_1m,

checkpoint_count tengu_startup_telemetry`

Telemetry init

Event Data tengu_exit_background_work_prompt

Background work prompt tengu_exit_plan_mode_called_outside_plan

Plan mode outside plan tengu_unclean_exit

session_age_sec

Event Data tengu_wif_user_oauth_lock_acquired

Lock acquired tengu_wif_user_oauth_lock_released

Lock released tengu_wif_user_oauth_lock_retry

Lock retry tengu_wif_user_oauth_lock_retry_limit

Retry limit

Category Events What It Tracks Other 632 @-mentions, attachments, cursor position, rename, rm, slow ops, code index, diff, edit, help, login, memory, op en, skill, stream, update, write, bug reports, claude chrome, config, headless, input, intent, json, keychain, kill, lifecycle, mod el, multi, npm, ollama, parse, rule, search, shell, skill, token, tool_use, user_input, zod, and 600+ more granular events Advisor 6 Advisor dialog, commands, tool calls/interrupts/tokens Agentic 1 Agentic search cancelled Ant 1 Overly broad bash detected ApiKeyHelper 1 Missing trust11 Assistant 1 Assistant install Async 1 Agent stall timeout BugReport 2 Bug report submitted/failed CLI 1 CLI flags Claude 11 Chrome onboarding, CLAUDE.md dialogs, skill loaded, install command Code 2 Code indexing, prompt ignored Diff 1 Diff tool changed Edit 1 Edit string lengths Headless 3 Latency, MCP prewait, plugin install Help 1 Help toggled Login 1 Login from refresh token Memory 2 Threshold crossed, toggled Org 1 Penguin mode fetch failed Open 1 Open agents via left panel Skill 4 File changed, loaded, tool invocation Stream 2 Loop exited, no events Update 2 Update check, refused

OS type and version Host architecture (x64, arm64, etc.) WSL version (if applicable) Free memory (startup perf only) Load average 1m (startup perf only) Customer type: "claude_ai" or "api" Subscription type: "free", "plus", "team", "enterprise", etc. Service version: "2.1.143" Every tool call (allowed, rejected, terminated, empty result, JSON parse fail) Every file operation (read, write, rename, rm, watch, history snapshot/rewind) Every shell command (completion, failure, CWD change, snapshot) Every permission prompt (escape attempt, option selected) Every model change (inline, menu, picker, fallback, whitespace response) Every input type (bash, command, prompt, invalid/missing slash) Every @-mention parsing result (success, error, directory, filename, MCP resource) Every attachment (size, too-large, compute duration) Every cursor position change Every session event (file read, branch ops, persistence, rename, preview, PR linking) Every plugin action (enable, disable, install, load, error, config) Every MCP action (config add/delete, auth, channel, proxy 401, degraded) Every git operation and lock error Every config change, cache stat, lock contention, parse error Every daemon event (start, idle exit, lease, crash, restart) Every feedback interaction (mode entered/collapsed, submitted) Every AskUserQuestion interaction (accepted, rejected, plan interview) Every rate limit interaction (hint, options menu) Every fast mode interaction (toggled, picker, fallback, overage) Every feature flag outcome (ok, bad, sad) Every agent lifecycle event (creation, memory, stop hooks, tool events) Every advisor interaction (dialog, command, tool call) Every OAuth event (token refresh, 401 recovery, auth code, SSO, MFA) Every API event (query, error, retry, 529, slow first byte, opus fallback) Every prompt suggestion (init, display) Every prompt cache event (break, diagnosis) Every stream event (loop exited, no events) Every update check and refusal Every bug report submission Every skill event (load, file changed, tool invocation) Every Ollama interaction Every NPM interaction Every intent detection Every JSON parse event Every keychain event Every lifecycle event Every rule event Every search event Every token event Every zod validation event Startup Performance (sampled 0.5%) Per-stage timing: import, main imports, init, settings, tools, MCP configs, plugins, headless setup, force login org, MCP connect , MCP connect user, MCP connect connector, GrowthBook init, prewait, sandbox init, process user input Total time Unaccounted time gap Free memory (MB) Load average (1m) Checkpoint count Message content -- no prompts, responses, or conversation text File contents -- no file data, only operation metadata Shell command output -- no stdout/stderr from commands API keys or tokens -- only success/failure events, never the values PII -- no names, emails, addresses, or personal identifiers Source code -- no code content, only operation counts Terminal content -- no terminal output or screen content Clipboard data -- no clipboard access Network request bodies -- only event metadata, not request/response payloads Environment variable values -- only presence/absence of specific vars, not their values Aspect Value Unique event names 954 Total event calls in code 1,330 Export interval 5 minutes Startup perf sampling 0.5% Default enabled Yes (first-party deployments) Disable method DISABLE_TELEMETRY=1

or DO_NOT_TRACK=1

Data destination api.anthropic.com/api/claude_code/metrics

Transport HTTP POST, JSON Auth Bearer token in request headers PII collected None Message content collected None File content collected None Command output collected None

── more in #ai-tools 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/telemetry-report-cla…] indexed:0 read:10min 2026-06-20 ·