v0.1.0 · OpenCode plugin bundle

Stop tiny tool bugs before they derail the whole agent run.

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.

0
plugins
0
deps
0
min TTL
OpenCode / tool.execute.before

Failure modes

Three small edges. One bad run.

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.

01

Question shape repair

Stringified `questions`, bare question objects, and stringified `options` get coerced back before OpenCode validates the call.

02

Narrow MCP coercion

Only selected schema-like fields are parsed. JSON-looking file bodies, commands, and user content stay untouched.

03

Prompt retry lock

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

Replay the guardrails.

Switch scenes to see each hook intervene at the exact point where the run would otherwise fail.

driver.mjs

Install

Use the GitHub file now. Switch to npm after login.

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.

~/.config/opencode/plugins
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

A boring guardrail for expensive mistakes.