Skip to content

Commit 42afbb2

Browse files
committed
Fix child process env: spread process.env before CODEX_HOME override
The env option on ChildProcess.make was set to only { CODEX_HOME: ... } without spreading process.env, causing the spawned codex exec process to lose all inherited environment variables (PATH, HOME, API keys, etc.). This matches the pattern used in codexAppServerManager.ts and CodexProvider.ts.
1 parent 7757947 commit 42afbb2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/server/src/git/Layers/CodexTextGeneration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ const makeCodexTextGeneration = Effect.gen(function* () {
172172
"-",
173173
],
174174
{
175-
env: codexSettings?.homePath ? { CODEX_HOME: codexSettings.homePath } : {},
175+
env: {
176+
...process.env,
177+
...(codexSettings?.homePath ? { CODEX_HOME: codexSettings.homePath } : {}),
178+
},
176179
cwd,
177180
shell: process.platform === "win32",
178181
stdin: {

0 commit comments

Comments
 (0)