Description
When passing an invalid argument like --unkown-flag, opencode shows the full help text but never tells the user what they did wrong. The error message msg is passed into the .fail() handler but never written to stderr.
Before the fix, opencode --unkown-flag and opencode --help produce identical output — the user has no way to know their argument was wrong.
The issue is in packages/opencode/src/index.ts:181-192. The .fail() handler calls cli.showHelp(show) but never outputs msg.
Plugins
No response
OpenCode version
1.15.10
No response
Steps to reproduce
- Run
opencode --unkown-flag
- Observe there is no error message telling you the argument is unknown
- Compare with
opencode --help — the output is identical
Screenshot and/or share link
No response
Operating System
Windows 10
Terminal
cmd
Description
When passing an invalid argument like
--unkown-flag, opencode shows the full help text but never tells the user what they did wrong. The error messagemsgis passed into the.fail()handler but never written to stderr.Before the fix,
opencode --unkown-flagandopencode --helpproduce identical output — the user has no way to know their argument was wrong.The issue is in
packages/opencode/src/index.ts:181-192. The.fail()handler callscli.showHelp(show)but never outputsmsg.Plugins
No response
OpenCode version
1.15.10
No response
Steps to reproduce
opencode --unkown-flagopencode --help— the output is identicalScreenshot and/or share link
No response
Operating System
Windows 10
Terminal
cmd