Bug Description
When sending a message through AutoAide's CLI shell, the underlying Codex CLI process crashes with SIGABRT, even though the exact same command works perfectly when run directly in the terminal.
Environment
- OS: macOS (Apple Silicon / MacBook Air)
- Node.js: v22+
- Codex CLI: codex-cli 0.118.0
- AutoAide: latest main branch
- Shell: zsh (with conda base environment active)
Steps to Reproduce
- Install AutoAide:
git clone && npm install && npm link
- Run
autoaide and complete the bootstrap flow
- Type any message, e.g.
hello
- Observe:
[autoaide> hello
Running on [main]...
autoaide>
Codex interrupted (SIGABRT).
Direct CLI Test (Works Fine)
Running the same underlying command manually succeeds:
$ echo "hello" | codex exec --skip-git-repo-check --json -
{"type":"thread.started","thread_id":"019d4a05-cbb3-7232-86a4-82d2bfe4b1a5"}
{"type":"turn.started"}
{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"Hello. What do you need?"}}
{"type":"turn.completed","usage":{"input_tokens":17226,"cached_input_tokens":3456,"output_tokens":70}}
Suspected Cause
In src/codex-runner.mjs, the command is spawned via zsh -lc:
spawn(shellSpec.command, [...shellSpec.args, command], {
cwd, // ~/.autoaide/workspace
env: process.env,
stdio: ["pipe", "pipe", "pipe"],
});
Possible causes:
- Workspace context injection —
buildWorkspacePrompt() prepends SOUL.md / IDENTITY.md / USER.md / TOOLS.md content via stdin. A malformed or overly large prompt may trigger the abort.
- CWD mismatch —
~/.autoaide/workspace may interact differently with Codex's internal path resolution vs a normal directory.
- Login shell interference —
zsh -lc loads the full login profile (conda, nvm, etc.) which may set environment variables or aliases that conflict with Codex when spawned as a child process.
- Signal handling — The daemon or parent process management may inadvertently send signals to the Codex child process.
Suggested Investigation
- Add error logging for stderr output of the spawned Codex process in
codex-runner.mjs
- Test with
zsh -c instead of zsh -lc to rule out login shell profile issues
- Log the exact prompt being piped to stdin to check for encoding or formatting issues
Bug Description
When sending a message through AutoAide's CLI shell, the underlying Codex CLI process crashes with
SIGABRT, even though the exact same command works perfectly when run directly in the terminal.Environment
Steps to Reproduce
git clone && npm install && npm linkautoaideand complete the bootstrap flowhelloDirect CLI Test (Works Fine)
Running the same underlying command manually succeeds:
Suspected Cause
In
src/codex-runner.mjs, the command is spawned viazsh -lc:Possible causes:
buildWorkspacePrompt()prepends SOUL.md / IDENTITY.md / USER.md / TOOLS.md content via stdin. A malformed or overly large prompt may trigger the abort.~/.autoaide/workspacemay interact differently with Codex's internal path resolution vs a normal directory.zsh -lcloads the full login profile (conda, nvm, etc.) which may set environment variables or aliases that conflict with Codex when spawned as a child process.Suggested Investigation
codex-runner.mjszsh -cinstead ofzsh -lcto rule out login shell profile issues