Description
Following and example of the bug, and the reasoning of the AI model as it replied
$ opencode run --model "invalid-model-123" "test" 2>/dev/null ; echo "EXIT: $?"
EXIT: 0
Thinking: So opencode is returning exit code 0 even when it prints an error message! This is a bug in opencode itself (it prints errors to stderr but exits with 0).
The fix for the harness should be to check if stderr has error content, not just exit code. Let me modify the runner to check stderr for error patterns:
The issue is that opencode returns exit code 0 even when it prints an error message. I need to modify runner.ts to check stderr for errors, not just exit code.
Plugins
none
OpenCode version
1.2.15
Steps to reproduce
$ opencode run --model "invalid-model-123" "test" 2>/dev/null ; echo "EXIT: $?"
Screenshot and/or share link
No response
Operating System
Linux / Archlinux
Terminal
zsh
Description
Following and example of the bug, and the reasoning of the AI model as it replied
Plugins
none
OpenCode version
1.2.15
Steps to reproduce
$ opencode run --model "invalid-model-123" "test" 2>/dev/null ; echo "EXIT: $?"
Screenshot and/or share link
No response
Operating System
Linux / Archlinux
Terminal
zsh