fix(codex): propagate extended PATH to codex subprocess#6874
Merged
katzdave merged 1 commit intoblock:mainfrom Feb 6, 2026
Merged
fix(codex): propagate extended PATH to codex subprocess#6874katzdave merged 1 commit intoblock:mainfrom
katzdave merged 1 commit intoblock:mainfrom
Conversation
8 tasks
When the Codex provider spawns `codex exec`, the subprocess inherits the parent process PATH, which is limited when launched from the desktop app. This causes failures finding Node.js and other dependencies needed by the codex CLI. Add PATH propagation using SearchPaths (matching the existing pattern in gemini_cli.rs) so the subprocess gets access to common binary locations like ~/.local/bin, /opt/homebrew/bin, and ~/.npm-global/bin. Fixes issue reported in block#6263 (comment by @Aerasyn). Signed-off-by: RamXX <ramxx@ramirosalas.com>
f0d4871 to
bd4f7b0
Compare
michaelneale
approved these changes
Feb 1, 2026
Collaborator
michaelneale
left a comment
There was a problem hiding this comment.
I think this makes sense. FYI @RamXX there is now a proper codex provider that uses the subscription, so could consider not using the cli now - one less thing (and is more full featured as it uses it as an api)
Contributor
Author
|
Thanks @michaelneale . Goose is moving so fast I can't keep up! thanks for the tip. I'll check it out. |
zanesq
added a commit
that referenced
this pull request
Feb 6, 2026
* origin/main: Remove build-dependencies section from Cargo.toml (#6946) add /rp-why skill blog post (#6997) fix: fix snake_case function names in code_execution instructions (#7035) Document max_turns settings for recipes and subagents (#7044) feat: update Groq declarative data with Preview Models (#7023) fix(codex): propagate extended PATH to codex subprocess (#6874) Switch tetrate tool filtering back to supports_computer_use (#7024) feat(ui): add inline rename for chat sessions in sidebar (#6995) fix: handle toolnames without underscores (#7015) feat(claude-code): use stream-json protocol for persistent sessions (#7029) test(providers): add model listing to live provider suite (#7038) Agent added too much (#7036) fix(deps): bump tree-sitter to 0.26 and set sqlx default-features=false to fix RUSTSEC advisories (#7031) feat: add image support and improve error resilience for Codex (#7033) fix(providers): Azure OpenAI model listing 404 during configure (#7034) fix(deps): bump bat to 0.26.1 to resolve RUSTSEC-2026-0008 (#7021) Don't swallow Tetrate errors (#6998) docs: remove hardcoded_stuff links (#7016) # Conflicts: # ui/desktop/src/components/GooseSidebar/AppSidebar.tsx
kuccello
pushed a commit
to kuccello/goose
that referenced
this pull request
Feb 7, 2026
Signed-off-by: RamXX <ramxx@ramirosalas.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the Codex CLI provider spawns
codex exec, the subprocess inherits the parent process's PATH. When goose is launched from the desktop app (Electron), this PATH is significantly more limited than a terminal session -- it lacks paths added by nvm, volta, pnpm, fnm, and other Node version managers. This causes the codex subprocess to fail finding Node.js and other dependencies.This fix adds PATH propagation using
SearchPaths::builder().with_npm().path(), matching the existing pattern already used bygemini_cli.rs. The subprocess now gets access to common binary locations (~/.local/bin,/opt/homebrew/bin,~/.npm-global/bin, etc.) plus the system PATH.Type of Change
AI Assistance
Testing
cargo fmt,cargo clippy -D warningscleancodex execworks with the extended PATHRelated Issues
Relates to #6263
Reported by @Aerasyn: #6263 (comment)
Also noted by @michaelneale during original review: "I had some issues with my codex install and the desktop - might have to have a follow on, but ran out of time for it. Something to do with path maybe."