Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.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

TierUnder the hoodhow much it should matter to you
Useful1my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaSessionswhat it touches
KindInternal Changesin v2.1.269,
Group of 2 Under the hood No documentation found

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

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