Preserve environment when launching Codex text generation

- Pass the full process environment to the Codex child process
- Keep CODEX_HOME override when a custom settings home is configured
This commit is contained in:
Julius Marminge committed 2026-03-25 22:52:00 -07:00
1 parent 6f34ca0b51
commit 9934b6ea76
1 file changed
+4 -1
@@ -172,7 +172,10 @@ const makeCodexTextGeneration = Effect.gen(function* () {
"-",
],
{
env: codexSettings?.homePath ? { CODEX_HOME: codexSettings.homePath } : {},
env: {
...process.env,
...(codexSettings?.homePath ? { CODEX_HOME: codexSettings.homePath } : {}),
},
cwd,
shell: process.platform === "win32",
stdin: {