Provider config-dir overrides (CODEX_HOME/CLAUDE_CONFIG_DIR) no longer reach agent panes after the #204 env scrub #211
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab#211
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
#204 scrubs the lab service environment from spawned tmux sessions: panes now receive only the explicit spawnEnv allow-list plus a PATH/HOME/TERM/locale baseline.
Before the scrub, an operator who set
CODEX_HOMEorCLAUDE_CONFIG_DIRon the lab unit got that override in every pane via full-env inheritance — the same accidental channel that leaked EnvironmentFile secrets. After the scrub, the lab-side code still honors the override (internal/provider/codex/codex.gocodexHomeDir,internal/provider/claudecode/logout.gocredentialsPath) but the CLI running inside the pane no longer sees it and falls back to$HOME/.codex/$HOME/.claude— a split-brain: lab seeds config and checks credentials in one directory while the agent CLI uses another.Impact today
None. No deployment sets these vars (unit env, nix module, and test rigs all clear — compat/logout tests exec the CLI directly, not via tmux). This is a latent seam, not a live regression.
What to build
If the override is a supported operator seam, it must reach panes deliberately: the provider adds its config-dir var to its spawn extraEnv (and login-session env) when set — spawnEnv-layer work per the #201/#202 boundary, not a tmuxx baseline addition. Alternatively, declare the override unsupported under lab and document that.
Blocked by
None.
Triage decision: wontfix
The report is accurate — verified by code trace: the tmuxx baseline scrub (#204) stops
CODEX_HOME/CLAUDE_CONFIG_DIRfrom reaching panes, while the lab-side resolvers (codexHomeDir,credentialsPath, both credauthority pokes) still honor them. The exposure is narrower than the title suggests, though: regular agent panes were never affected (InjectCredentialspins the config-dir var explicitly to the instance home), so the only split-brain surface is the host-mode login session, which is spawned with no extra env — a login would write credentials to~/.codex/~/.claudewhile lab reads the overridden master dir.Why we're not actioning it:
If a real deployment ever needs a relocated master store under host mode, this can be reopened with that concrete case.