Skip to content

[codex] Fix fnm agent path detection#43

Merged
NitayRabi merged 1 commit into
mainfrom
codex/fix-fnm-node-path-detection
May 15, 2026
Merged

[codex] Fix fnm agent path detection#43
NitayRabi merged 1 commit into
mainfrom
codex/fix-fnm-node-path-detection

Conversation

@NitayRabi

Copy link
Copy Markdown
Collaborator

What changed

This updates agent detection so saved agent environments prepend the resolved executable directories for both the detected agent CLI and node, then retain the original shell PATH as fallback.

It also adds a regression test for an fnm-style symlinked shim layout and documents the failure mode in the local development and past failures docs.

Why

Daemon-side health probes were failing in fnm environments with /usr/bin/env: 'node': No such file or directory even though detection succeeded interactively.

The root cause was that detection persisted the shell's raw PATH ordering. In fnm setups that can prioritize transient multishell shim directories ahead of the stable Node installation path, so later daemon runs could reuse a stale shim path.

Impact

Nodes detected from fnm-managed shells now save a more durable runtime path for agent CLIs that depend on node, which should stop false-offline health probe failures after the daemon restarts.

Existing nodes should be re-detected once so their saved agent config picks up the new PATH ordering.

Validation

  • go test ./internal/app ./internal/acpx ./internal/nodeconfig

@NitayRabi NitayRabi marked this pull request as ready for review May 15, 2026 14:47
@NitayRabi NitayRabi merged commit 6891367 into main May 15, 2026
3 checks passed
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