MCPcopy
hub / github.com/codeaashu/claude-code / envSessionKind

Function envSessionKind

src/utils/concurrentSessions.ts:31–37  ·  view source on GitHub ↗

* Kind override from env. Set by the spawner (`claude --bg`, daemon * supervisor) so the child can register without the parent having to * write the file for it — cleanup-on-exit wiring then works for free. * Gated so the env-var string is DCE'd from external builds.

()

Source from the content-addressed store, hash-verified

29 * Gated so the env-var string is DCE'd from external builds.
30 */
31function envSessionKind(): SessionKind | undefined {
32 if (feature('BG_SESSIONS')) {
33 const k = process.env.CLAUDE_CODE_SESSION_KIND
34 if (k === 'bg' || k === 'daemon' || k === 'daemon-worker') return k
35 }
36 return undefined
37}
38
39/**
40 * True when this REPL is running inside a `claude --bg` tmux session.

Callers 2

isBgSessionFunction · 0.85
registerSessionFunction · 0.85

Calls 1

featureFunction · 0.85

Tested by

no test coverage detected