Point CLAUDE_CODE_MESSAGING_SOCKET at a socket path to enable session-to-session messaging and stream-json message replay.
What's wrong with this entry?
Set CLAUDE_CODE_MESSAGING_SOCKET to a socket path and Claude Code records it with the session and, when the output format is stream-json, turns on replay of user messages without you asking for it. The variable is also carried through the set of CLAUDE_CODE_* variables Claude Code forwards to what it launches.
- The path is stored on the session registration record as
messaging_socket_path. - Replay is only auto-enabled when it was not already on and the output format is
stream-json; other output formats ignore the socket path for this purpose. - Neither the variable nor the session field existed in the previous build.
CLAUDE_CODE_MESSAGING_SOCKET
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.229
Injected stream-json user messages no longer count as human turns
Both mention stream json
-
v2.1.248
Peer address row in the info panel
Both mention socket cross