What
Environment variables are named settings handed to a program when it starts. A remote session is Claude Code running on another machine. A new variable, CLAUDE_CODE_SPEND_PROJECT, has been added, and remote sessions now handle it together with CLAUDE_PROJECT_UUID:
- Both variables were added to the lists of environment settings that are passed through or passed on to other processes.
- When a remote session picks its project, it reads
CLAUDE_PROJECT_UUIDfirst, thenCLAUDE_CODE_SPEND_PROJECT, then a stored project ID. - The block that writes environment settings for child processes now writes
CLAUDE_PROJECT_UUIDandCLAUDE_CODE_SPEND_PROJECTas well. Before, onlyCLAUDE_CODE_ATTRIBUTION_PROJECTwas written there. Each value is left empty unlessCLAUDE_CODE_REMOTEis set.
Why
In remote and hosted sessions, the project that work and spending count against can now be set from the environment, and it carries over to the programs that session starts.
Names in the bundleCLAUDE_CODE_SPEND_PROJECTCLAUDE_PROJECT_UUID