What
- A new gate detects when Claude Code is running as
CLAUDE_CODE_REMOTEwith an OTel traces endpoint that isn't localhost ("off-box"). When true, spans for interactions, LLM requests, tool calls, and subagent spawns redact sensitive data: user prompts become"<REDACTED>"even ifOTEL_LOG_USER_PROMPTSis set, model names are replaced with a hashed/normalized value (with a newtool_name_safe/query_source_safeattribute instead of the raw value), agent ids are anonymized, and custom subagent types are reported simply as"custom". The interaction span also gains link propagation (queued_sends) and aparent.sourceattribute. - Tool-call failure telemetry now records a separate
errorClassfield alongside the error message/code. - Error-attribute recording was reworked so a single
errorstring is replaced by both anerrorfield and a sanitizederror_class(letters/digits/underscore only, matching/^[A-Za-z][A-Za-z0-9_]{0,47}$/). The rawerrortext is omitted entirely when telemetry is judged to be leaving the box, using the same off-box condition described above.
Why These changes keep sensitive data like prompts, model names, and raw error text out of telemetry that leaves the local machine, while still preserving a normalized, non-sensitive error classification for debugging.
Names in the bundleerror_class
Documented inclaude-code/monitoring-usage
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up error_class, on Monitoring.
| `error_class` | Short error class token when the request failed, such as `api_timeout` or `server_overload`. Requires Claude Code v2.1.268 or later | |monitoring-usage see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up error_class, on Monitoring.