Repository navigation
fix: restore PATH/PATHEXT after spreading the provider environment - #1
Merged
Merged
Conversation
On Windows the environment block stores the search path as mixed-case "Path". process.env.PATH resolves case-insensitively, but localAgentProviderEnvironment builds the per-provider env with a spread, which copies only the original key casing. Consumers then read env.PATH on a plain object, get undefined, and both the availability walk and the Codex driver's executable resolution report "executable not found" -- while the same probe succeeds from shells that export an uppercase PATH. Restore the canonical PATH/PATHEXT keys after the spread, from any casing present in the inherited env, without overwriting existing keys.
FJ-double
pushed a commit
to FJ-double/taskquay
that referenced
this pull request
Oct 16, 2026
Add single-user OAuth for DevSpace MCP
FJ-double
pushed a commit
to FJ-double/taskquay
that referenced
this pull request
Oct 16, 2026
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.
Windows stores the search path in the environment block as mixed-case
Path.process.env.PATHresolves case-insensitively, butlocalAgentProviderEnvironmentbuilds each provider's env with a spread, which copies only the original key casing. Every consumer that later readsenv.PATHfrom that plain object getsundefined: the availability walk reports codex/grok as "executable not found" on the startup banner, and the Codex driver'sresolveCodexCommandfails before inference withPROVIDER_UNAVAILABLE: Codex executable was not found.— while the same probe succeeds from any shell that exports an uppercasePATH(e.g. Git Bash), so it only bites standard Windows service environments such as a cmd-launched MCP server.The fix restores the canonical
PATHandPATHEXTkeys after the spread, sourcing values from any casing present in the inherited env and never overwriting an existing key. A regression test covers aPath-only inherited env, and I verified end-to-end in a child process whose environment block contains onlyPaththat provider driver resolution now finds the codex executable (it returned undefined before).