-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Description
The CodexTextGeneration layer (used for generating commit messages, PR content, and branch names) hardcodes "codex" as the binary name in ChildProcess.make(). When the codex CLI is not on PATH (e.g., installed via fnm, homebrew, or at a custom path), text generation fails with a spawn codex ENOENT error.
The app already has a codexBinaryPath setting in AppSettings, and it correctly flows to codexAppServerManager via providerOptions. However, this setting is not passed to the CodexTextGeneration layer, so git text generation always spawns bare codex.
Error
PlatformError: NotFound: ChildProcess.spawn (codex exec --ephemeral -s read-only --model gpt-5.4-mini ...)
[cause]: Error: spawn codex ENOENT
Fix
Thread codexBinaryPath from app settings through the same path as textGenerationModel:
- Add
codexBinaryPathtoGitRunStackedActionInputcontract - Pass it from client app settings through
gitReactQuerymutation options - Add it to
CommitMessageGenerationInput,PrContentGenerationInput,BranchNameGenerationInput - Use it in
CodexTextGeneration.runCodexJson()instead of hardcoded"codex"
Affected files
packages/contracts/src/git.tsapps/web/src/lib/gitReactQuery.tsapps/web/src/components/GitActionsControl.tsxapps/server/src/git/Services/TextGeneration.tsapps/server/src/git/Layers/CodexTextGeneration.tsapps/server/src/git/Layers/GitManager.ts
Related issues
Related to #693 (healthcheck also ignores binary path settings)
Related to #246, #234, #269 (codex binary not found in various environments)