Share the recovered login PATH with task tools on macOS - #941
Merged
Merged
Conversation
Settings detected Codex through the runtime's recovered interactive login-shell PATH, but task tools (list_agent_providers, agent_start, and the shell tool) independently probed Goose's default bash shell. Where the user's login shell is zsh and Codex lives on a zsh-only PATH entry such as ~/.local/bin, Settings showed Codex installed and signed in while tasks reported it missing and fell back to the internal delegate. Thread the recovered host PATH through SessionAgentConfiguration into MapleDeveloperClient so integration discovery, the shell tool, and external-agent launch all search the same PATH. The previous bash probe remains as the fallback when no PATH was recovered, and non-macOS behavior is unchanged. A regression test verifies Settings detection, shell lookup, and the spawned child's PATH agree using a temporary fake Codex install, and that the process-global PATH is untouched. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.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.
Follow-up to #934. Fixes a macOS PATH inconsistency found while testing that PR end-to-end.
Problem
Settings detected Codex through the runtime's recovered interactive login-shell PATH, but the task tools (
list_agent_providers,agent_start, and the shell tool) independently probed Goose's default bash shell. Where the user's login shell is zsh and Codex sits on a zsh-only PATH entry (e.g.~/.local/bin), Settings showed Codex installed and signed in while tasks reported "Codex is not installed, orcodexis not on PATH" and silently fell back to the internal delegate.Fix
Thread the recovered host PATH through
SessionAgentConfigurationintoMapleDeveloperClientso integration discovery, the shell tool, and external-agent launch all search the same PATH. The previous bash probe remains as the fallback when no PATH was recovered, and non-macOS behavior is unchanged.Validation
just cipasses (format, all four Clippy configurations, warning-denied workspace/all-targets build, default and headless tests).agent_start→ Codex thread completed → expected marker, empty command/file lists on a no-write task.Separate follow-ups (truncated output recall, redundant
provideron follow-up tools) are filed as #940.