CLAUDE_CODE_MESSAGING_TOKEN
A Claude Code environment variable, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
Set by Claude Code, not by you: in sessions that bind an inbox socket, Claude Code exports this per-session token to hooks and Bash commands alongside CLAUDE_CODE_MESSAGING_SOCKET. A script posting to the socket can send {"type":"auth","token":"<token>"} as its first line to prove it belongs to the session. On native Windows, Claude Code requires this line and closes any connection that doesn't open with a valid one. The own-child rules say when Claude Code consults the token. Each session exports its own token, never one inherited from a parent session. Settings env blocks can't set it. Requires Claude Code v2.1.228 or later
Anthropic's own wording. Read off Environment variables, captured 2026-09-28.
In the changelogs
2Releases whose published page names CLAUDE_CODE_MESSAGING_TOKEN.
-
v2.1.228
Cross-session messaging between Claude Code sessions is now authenticated
Messages between your Claude Code sessions are now token-authenticated, strictly on Windows and best-effort elsewhere.
named in this entry, found in this entry's text
-
v2.1.228
Local messaging inbox publishes an auth key so peers can prove who they are
Your local message inbox publishes a key file so other sessions can prove who they are.
named in this entry, found in this entry's text
First cited
1The earliest release whose published evidence quoted CLAUDE_CODE_MESSAGING_TOKEN was v2.1.228, 11 Aug 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
Presence across releases
0The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the environment variable does. All environment variables.