mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-03 08:18:23 +00:00
fix(delegation): strip CLAUDECODE env var to bypass nested session guard
Claude Code v2.1.39+ sets CLAUDECODE env var and refuses to launch if detected, breaking CCS auto-delegation which spawns child Claude processes. Strip the var from both interactive (execClaude) and headless (HeadlessExecutor) spawn paths. Closes #588
This commit is contained in:
@@ -84,6 +84,10 @@ export function execClaude(
|
||||
? { ...baseEnv, ...envVars, ...webSearchEnv }
|
||||
: { ...baseEnv, ...webSearchEnv };
|
||||
|
||||
// Strip Claude Code nested session guard env var to allow CCS delegation
|
||||
// (Claude Code v2.1.39+ sets CLAUDECODE to detect nested sessions)
|
||||
delete env.CLAUDECODE;
|
||||
|
||||
// propagate key env vars to tmux session so agent team teammates
|
||||
// (spawned via tmux split-window) inherit the correct config dir
|
||||
if (process.env.TMUX && envVars) {
|
||||
|
||||
Reference in New Issue
Block a user