From b0ef22e702b590716432a4afb5d3c15e4a2af821 Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Wed, 11 Mar 2026 05:07:34 +0900 Subject: [PATCH] fix: use CODEX_HOME instead of CODEX_CONFIG_DIR for per-group session isolation CODEX_CONFIG_DIR is not recognized by Codex CLI. CODEX_HOME is the correct env var that controls the root directory for sessions, state, and config. Without this, all groups sharing the same workDir would have their sessions collide, causing resume --last to pick up wrong group's session. --- src/container-runner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/container-runner.ts b/src/container-runner.ts index 622cdf8..4ebaa90 100644 --- a/src/container-runner.ts +++ b/src/container-runner.ts @@ -233,7 +233,7 @@ function prepareGroupEnvironment( fs.copyFileSync(src, dst); } } - env.CODEX_CONFIG_DIR = sessionCodexDir; + env.CODEX_HOME = sessionCodexDir; } else { // Claude Code — pass real credentials directly if (envVars.ANTHROPIC_API_KEY || process.env.ANTHROPIC_API_KEY) {