What
An MCP server is an outside program that gives Claude Code extra tools. When Claude Code starts one as a local process, it now sets the environment variable CLAUDE_CODE_LAUNCHED_BY_SESSION_IDS to the id of the current session, alongside CLAUDE_CODE_SESSION_ID. A session is one run of Claude Code with its conversation.
Why
An MCP server can now tell which session launched it, which helps when you need to trace its activity back to a particular session.
Names in the bundleCLAUDE_CODE_LAUNCHED_BY_SESSION_IDSCLAUDE_CODE_SESSION_ID
One source agreesOne thing we can check says the same as this entry.
The name it cites is new in this build
New in this build: CLAUDE_CODE_LAUNCHED_BY_SESSION_IDS