{"version":"2.1.224","anchor":"local-messaging-socket-where-it-lives-who-can-read-it-and-re","canonical_anchor":"local-messaging-socket-where-it-lives-who-can-read-it-and-re","heading":"Local messaging socket: where it lives, who can read it, and refusing to steal a live one","tier":"use","area":"Cross-Session Messaging","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224\/e\/local-messaging-socket-where-it-lives-who-can-read-it-and-re","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224","markdown":"### Local messaging socket: where it lives, who can read it, and refusing to steal a live one\n\nThe messaging socket lives under XDG_RUNTIME_DIR with locked-down permissions and refuses to hijack a live one.\n\n**What**\n\nThe local socket used for session-to-session messaging binds under `$XDG_RUNTIME_DIR\/cc-socks\/<pid>.sock`, with the directory created 0700 and the socket 0600, and its path exported as `CLAUDE_CODE_MESSAGING_SOCKET`. If you pass `--messaging-socket-path` pointing at a socket something is already listening on, startup refuses rather than hijacking it.\n\n**Details**\n\n- Falls back to a `\/tmp` path, or `$PREFIX\/tmp` under Termux, when the primary path would exceed the 103 byte limit on socket paths.\n- Non-local paths are refused outright.\n- Input is line-delimited JSON; any line over 1 MiB is dropped.\n\n**Evidence**\n\n`--messaging-socket-path points to a live socket: `\n\n- Area: Cross-Session Messaging\n- Names: `--messaging-socket-path`, `CLAUDE_CODE_MESSAGING_SOCKET`, `XDG_RUNTIME_DIR`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 4\/5"}