Unclear It is not clear what sets the session identifier that selects the per-session setup.
In remote sessions (with CLAUDE_CODE_REMOTE set and the agent proxy turned on), Claude Code can put in place a stand-in gh command, a small program that takes the place of the GitHub command-line tool. This is set up differently now:
- Each session gets its own folder under
sessions/, instead of all sharing one folder. - In selective relay mode, where GitHub requests are not sent through the session's proxy, no stand-in is created if
ghis not already installed. - If an outer session already set up its own stand-in, Claude Code leaves it alone.
- The stand-in file is deleted by a cleanup step when it is no longer needed.
- When the
ghin use is not the stand-in, the note Claude reads says it is the machine's own GitHub CLI.
This changes how gh behaves inside remote sessions, and Claude is told more accurately which gh it is using.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
| `CLAUDE_CODE_REMOTE_SLACK_THREAD_URL` | For a [Claude Tag](https://claude.com/docs/claude-tag/overview) session that belongs to one Slack thread, the link to that thread. Unset for other sessions, and can be unset for a thread session to…self-hosted-environments-configuration see the edit
It is not clear what sets the session identifier that selects the per-session setup.
Anthropic's documentation has since written up CLAUDE_CODE_REMOTE, on Customize sessions in self-hosted environments.