@op1/reprompt
v0.5.2
Published
Optional reprompt plugin for incoming prompt compilation, bounded evidence packing, and safe retry orchestration
Downloads
11
Readme
@op1/reprompt
Optional OpenCode plugin for incoming prompt compilation, bounded evidence packing, and explicit retry orchestration.
What It Does
- pre-compiles terse incoming prompts before agent execution when
runtime.modeishook-and-helper - leaves already-structured prompts unchanged
- exposes
repromptfor manual bounded retries and child-session escalation - fails closed by passing the original prompt through when compilation is suppressed or unsafe
Incoming chat prompts can opt in with either a leading marker (opx fix auth flow) or a trailing marker (fix auth flow opx). Slash commands support both forms as well (/plan opx fix auth flow and /plan fix auth flow opx).
Config
Create either ~/.config/opencode/reprompt.json or .opencode/reprompt.json.
{
"enabled": true,
"runtime": {
"mode": "hook-and-helper",
"promptMode": "auto",
}
}Key options:
enabled: turns the plugin on or offruntime.mode:hook-and-helperenables from-the-start prompt compilation;helper-onlydisables the incoming-message hook and keeps onlyreprompt
Telemetry
When telemetry persistence is enabled, events are written to:
.opencode/reprompt/events.jsonl
Useful outcomes to watch for:
incoming-processedwithoutcome=compiledincoming-processedwithoutcome=pass-throughincoming-processedwithoutcome=suppressed
Operator Notes
- Start with the plugin enabled only in repos where terse prompts are common
- Use
helper-onlyif automatic prompt compilation is too aggressive for a workflow - Flip
enabledtofalseor switchruntime.modetohelper-onlyfor immediate rollback without uninstalling the plugin - If prompts are unexpectedly rewritten, inspect
.opencode/reprompt/events.jsonlbefore changing heuristics
