Question shape repair
Stringified `questions`, bare question objects, and stringified `options` get coerced back before OpenCode validates the call.
A dependency-free OpenCode plugin package that repairs malformed question arguments, narrows MCP object coercion, and blocks repeated prompts while the user is still answering.
Failure modes
The package exists for the boring but expensive stuff: tool args that are almost right, UI placeholders that models misread, and repeat prompts that bury the original question.
Stringified `questions`, bare question objects, and stringified `options` get coerced back before OpenCode validates the call.
Only selected schema-like fields are parsed. JSON-looking file bodies, commands, and user content stay untouched.
A per-session lock blocks repeated question calls until the user replies, rejects, types a new message, or the safety TTL expires.
See it catch
Switch scenes to see each hook intervene at the exact point where the run would otherwise fail.
Install
The GitHub release is live. The npm package is not published yet because the maintainer account still needs npm login. Install the same plugin functions as a local OpenCode plugin file for now.
mkdir -p ~/.config/opencode/plugins
curl -fsSL https://raw.githubusercontent.com/nxxxsooo/opencode-plugin-fixes/main/src/index.js \
-o ~/.config/opencode/plugins/opencode-plugin-fixes.js
# Then remove the three old local plugin entries from opencode.json:
# ./plugin/fix-question-schema.js
# ./plugin/fix-mcp-nested-object.js
# ./plugin/block-repeat-question.js
After the maintainer logs in and runs npm publish, the local file can be replaced by a single `opencode-plugin-fixes` entry in OpenCode's plugin array.
Release v0.1.0