Skip to content

[AIDE-98] Fix SDKs - #78

Merged
chandlerhuff merged 4 commits into
mainfrom
feature/AIDE-98-fix-sdks
Jul 31, 2026
Merged

[AIDE-98] Fix SDKs#78
chandlerhuff merged 4 commits into
mainfrom
feature/AIDE-98-fix-sdks

Conversation

@chandlerhuff

Copy link
Copy Markdown
Member

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

  • Repair the inherited PATH at startupmain() now calls repairToolPath() 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.
  • Resolve codex by absolute path — the Codex adapter resolves codex via findExecutable (honoring CONTROL_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-name codex call that failed.
  • Resolve opencode by absolute path — the OpenCode adapter resolves opencode (honoring CONTROL_AGENT_OPENCODE_EXECUTABLE) and prepends the resolved install directory to PATH so the SDKs bare-name cross-spawn picks up the same install.
  • Clear install errors — when a tool is missing, users now get explicit install instructions or the override variable name instead of an opaque ENOENT.
  • Added ~/.opencode/bin — the directory the opencode.ai install script uses was missing from the searched tool directories.
  • Unit tests — coverage for repairToolPath, extendedPath, and prependPathDirectory (PATH repair, deduplication, and ordering).
  • Mock data fix — the newest seeded run now pins updatedAt to its createdAt so age labels and day groups stay stable across seeds.

Ticket: AIDE-98

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.
@chandlerhuff chandlerhuff self-assigned this Jul 31, 2026
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.
@chandlerhuff
chandlerhuff merged commit 7759b21 into main Jul 31, 2026
3 checks passed
@chandlerhuff
chandlerhuff deleted the feature/AIDE-98-fix-sdks branch July 31, 2026 21:25
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