You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add a Ralph-style loop plugin built on experimental.idle #61293
Users who want the Ralph Wiggum technique have to wrap opencode run in an external shell loop. Claude Code implements it as a blocking Stop hook; OpenCode has no on_exit, but experimental.idle already supports the same use case — the built-in /goal plugin uses it as a stop-hook-style loop.
Proposal
Add an official plugin at packages/plugins/ralph-loop built on experimental.idle:
state persisted per session and as a session instruction entry, so compaction does not lose the task
waits for the session's own running shell/subagent; that work wakes it again
pauses on server restart instead of resuming silently
only injects synthetic prompts; it never runs tools or bypasses permissions
No core changes and no new runtime dependency. Local branch with implementation and tests is ready; I am opening this request before the implementation PR, per CONTRIBUTING.
Benefits
first-class Ralph loops without external wrappers
bounded by --max-iterations
safer than a shell loop: provider permissions and session state remain authoritative
Thanks for the detailed proposal, and for opening a request before the PR, @Gutem!
To restate it: you'd like an official ralph-loop plugin built on the existing experimental.idle session hook. It would add /ralph-loop <task> [--completion-promise <text>] [--max-iterations <n>] and /cancel-ralph, so the same task keeps running until the completion marker appears or the iteration limit is reached, without an external shell loop. The maintainers will consider it, including whether it should ship as an official plugin or be listed as a community plugin.
Because it needs no core changes, you can publish it now as a standalone npm package and load it through the plugin list in your config, so people can use it before any decision on including it.
Activity
opencodejr commentedon Nov 2, 2026
Thanks for the detailed proposal, and for opening a request before the PR, @Gutem!
To restate it: you'd like an official
ralph-loopplugin built on the existingexperimental.idlesession hook. It would add/ralph-loop <task> [--completion-promise <text>] [--max-iterations <n>]and/cancel-ralph, so the same task keeps running until the completion marker appears or the iteration limit is reached, without an external shell loop. The maintainers will consider it, including whether it should ship as an official plugin or be listed as a community plugin.Because it needs no core changes, you can publish it now as a standalone npm package and load it through the
pluginlist in your config, so people can use it before any decision on including it.Related issues:
experimental.stoppinghook, a different way to keep the agent going before it stopsSessionIdle.background(relevant to waiting on the session's own shells and subagents)neriousy commentedon Nov 12, 2026
experimental.idlewas built so this can live as a community plugin. We won't ship it as an official one, but feel free to publish it.