Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.269 ·

New CLAUDE_CODE_SESSION_ATTENDED environment variable for child sessions

A new CLAUDE_CODE_SESSION_ATTENDED env var tells spawned Claude Code child processes whether the parent session is an attended, interactive one

Group of 2 Under the hood No documentation found Internal Changes
JSON All of v2.1.269
Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SessionsArea: what it touches
Internal ChangesKind: in v2.1.269,
What probably matters to youSection of the release

What

When Claude Code spawns a child process (a sub-process running its own Claude Code session), it now sets a new environment variable, CLAUDE_CODE_SESSION_ATTENDED, to "1" or "0". This is computed by checking whether the session type isn't a background/daemon/daemon-worker session and whether the session is interactive or was launched from a known interactive launcher (such as VS Code, the desktop app, or remote access). The child process reads this value back via setSpawnedByAttendedSession.

That flag then feeds into a check (spawnedByAttendedSession) that determines whether a non-interactive (non-TTY) child session probes for an 'ambient marker' (a signal used for session persistence, e.g. related to tmux) before falling back to other session-persistence behavior.

Why

This lets a child Claude Code process know whether it was launched from a real, attended user session versus an unattended/background one, so it can make a more accurate decision about how to persist or recover its session.

Read from
Names in the bundleCLAUDE_CODE_SESSION_ATTENDED
How sure we are
One source agreesOne thing we can check says the same as this entry.
The name it cites is new in this buildNew in this build: CLAUDE_CODE_SESSION_ATTENDED

See this entry in the whole of v2.1.269 →

Feedback