Archived · source-only OpenCode experiment

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

An archived, dependency-free OpenCode source bundle that explored four narrow tool-call guardrails. It was never published to npm.

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

Failure modes

Four small edges. One bad run.

The source explored boring but expensive failures: tool args that are almost right, nested arrays that models stringify, 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

DCP compress repair

Flat compress ranges and stringified range arrays get restored to DCP's native content array before validation.

04

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

Historical status

Archived source. No npm package.

The repository is read-only. The final main branch contains all four guardrails, while the initial v0.1.0 tag predates FixDcpCompressFlat.

historical reference
# Historical reference only
Repository: https://github.com/nxxxsooo/opencode-plugin-fixes
npm package: never published
OpenCode package entry: invalid

Do not add `opencode-plugin-fixes` to OpenCode's plugin array. The archived repository is preserved as source history, not as a supported installation path.

Archived source · July 2026

A boring guardrail for expensive mistakes.