Repository navigation
fix(cli): set non-zero exit code when run command encounters errors - #14625
kevinWangSheng wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
I’m also seeing this issue. When opencode terminates unexpectedly, the exit code is not reported correctly. This PR would be very helpful — hope it can be merged soon. |
|
Same issue. Running |
|
Heads-up — I opened #26588 with a smaller alternative for the same bug (sets |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #14551
Type of change
What does this PR do?
opencode runexits with code 0 even when the session encounters errors, breaking CI/CD pipelines. The fix awaits the event loop completion and setsprocess.exitCode = 1when errors occurred.How did you verify your code works?
Verified the exit code changes to 1 when the session produces errors. Only
run.tsis modified.Screenshots / recordings
N/A - no UI change.
Checklist