Skip to content

Share the recovered login PATH with task tools on macOS - #941

Merged
AnthonyRonning merged 1 commit into
masterfrom
plan-codex-integration
Sep 15, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
plan-codex-integration

Conversation

@AnthonyRonning

Copy link
Copy Markdown
Contributor

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, or codex is not on PATH" and silently fell back to the internal delegate.

Fix

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.

Validation

  • New regression test uses a temporary fake Codex install and verifies Settings detection, shell lookup, and the spawned child's PATH all agree, and that process-global PATH is untouched.
  • Component just ci passes (format, all four Clippy configurations, warning-denied workspace/all-targets build, default and headless tests).
  • Real delegation verified end-to-end in the GPUI app: agent_start → Codex thread completed → expected marker, empty command/file lists on a no-write task.

Separate follow-ups (truncated output recall, redundant provider on follow-up tools) are filed as #940.

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>
@AnthonyRonning
AnthonyRonning merged commit 189f414 into master Sep 15, 2026
27 checks passed
@AnthonyRonning
AnthonyRonning deleted the plan-codex-integration branch September 15, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant