What
Claude Code now reads a new environment variable, CLAUDE_CODE_USER_DELEGATED_SESSION_DIRECT_API. An environment variable is a named value set outside Claude Code that changes how it behaves.
When it is set in a session's environment variables:
- If the session's process exits with code 1 and its error output matches a known pattern, Claude Code records that the user-delegated session route was refused, and reports it as a session configuration error.
- If the result is unavailable or the conversation is too long, the session is treated as blocked.
Why
This is a new mode for remote sessions with its own way of reporting failures. Only setups that set this variable see it.
Names in the bundleCLAUDE_CODE_USER_DELEGATED_SESSION_DIRECT_API
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_USER_DELEGATED_SESSION_DIRECT_API