Claude Code now attaches trace context to messages relayed across sessions when running in remote mode
What
Claude Code now extracts and propagates a trace_context (a traceparent value) and an event UUID when a turn is merged across sessions. This is sent as anthropic/ccr-turn-event-uuid and anthropic/ccr-turn-linked-event-uuids request headers.
When building the internal message for an incoming user message, a new traceContext field is now attached to it as well, computed via a new helper.
This behavior only applies when CLAUDE_CODE_REMOTE is set, and part of it is further gated to a specific dynamic-scope MCP server configuration.
Why
This helps trace and correlate related turns and messages when Claude Code is operating in a remote/cross-session mode, which is useful for debugging and observability but has no direct effect on typical local 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.
* **No cloud-only scoping**: hooks run in both local and cloud sessions. To skip local execution, exit early unless the `CLAUDE_CODE_REMOTE` environment variable is `true`, the way the [dependency install script](#install-dependencies-with…cloud-environments see the edit
A small documentation edit on Configure cloud environments touched a line naming CLAUDE_CODE_REMOTE after this was published.