{"version":"2.1.224","anchor":"new-environment-variable-claude-code-messaging-socket","canonical_anchor":"new-environment-variable-claude-code-messaging-socket","heading":"New environment variable CLAUDE_CODE_MESSAGING_SOCKET","tier":"use","area":"Cross-Session Messaging","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224\/e\/new-environment-variable-claude-code-messaging-socket","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224","markdown":"### New environment variable `CLAUDE_CODE_MESSAGING_SOCKET`\n\nPoint CLAUDE_CODE_MESSAGING_SOCKET at a socket path to enable session-to-session messaging and stream-json message replay.\n\n**What**\n\nSet `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.\n\n**Details**\n\n- The path is stored on the session registration record as `messaging_socket_path`.\n- 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.\n- Neither the variable nor the session field existed in the previous build.\n\n**Evidence**\n\n`CLAUDE_CODE_MESSAGING_SOCKET`\n\n- Area: Cross-Session Messaging\n- Names: `CLAUDE_CODE_MESSAGING_SOCKET`, `stream-json`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 4\/5"}