[AIDE-98] Fix SDKs - #78
Merged
Merged
Conversation
Resolve codex and opencode by full path with override variables instead of bare-name spawns that fail with opaque ENOENT under the launchd PATH. Repair the inherited PATH with the usual tool directories and prepend a resolved tool's own directory so third-party SDKs can spawn their binaries. Add tests for the new executable-lookup helpers and fix the runs mock data updatedAt stamp.
Extract the resolved codex path into a helper so the bundled model catalog generation uses the same absolute executable as the app server spawn, instead of resolving only in start() and still calling bare-name codex for the catalog, which fails with ENOENT under the launchd PATH.
Mock findExecutable and prependPathDirectory so the adapter tests do not depend on a real opencode install being present on PATH.
Apply border-l-4 and the accent classes only when a color is set, so unhighlighted cards no longer reserve the border width. Update tests to assert the border on highlighted cards and its absence on plain ones.
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
The control-agent runs as a launchd service, which starts processes with a bare PATH (
/usr/bin:/bin:/usr/sbin:/sbin) that hides Homebrew, npm, and bun installs. This caused bare-name spawns of the codex and opencode binaries to fail with opaque ENOENT errors, breaking both providers.This branch makes every binary invocation resolve to an absolute path and repairs the PATH that child processes inherit.
Changes
main()now callsrepairToolPath()before running any command, so every child process (including ones third-party SDKs spawn by bare name) inherits a PATH that includes~/.local/bin,~/.bun/bin,~/.npm-global/bin,~/.opencode/bin, the node directory, and Homebrew/usr-local bins on darwin.codexviafindExecutable(honoringCONTROL_AGENT_CODEX_EXECUTABLE) once, and uses that same absolute path for both the app-server spawn and the bundled model catalog generation, instead of one bare-namecodexcall that failed.opencode(honoringCONTROL_AGENT_OPENCODE_EXECUTABLE) and prepends the resolved install directory to PATH so the SDKs bare-name cross-spawn picks up the same install.~/.opencode/bin— the directory the opencode.ai install script uses was missing from the searched tool directories.repairToolPath,extendedPath, andprependPathDirectory(PATH repair, deduplication, and ordering).updatedAtto itscreatedAtso age labels and day groups stay stable across seeds.Ticket: AIDE-98