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]:Implement /loop command for automated iterative task execution #18001
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Currently, performing repetitive or time-based tasks in OpenCode requires long, descriptive natural language prompts or external scripting (Python/Bash). While OpenCode is powerful at autonomous execution, it lacks a shorthand, native command to handle iterative workflows—similar to the /loop feature in Claude Code.
Implementing a native /loop command would bridge the gap between "one-off task execution" and "autonomous background agent."
User Story
"As a developer, I want to execute a command like /loop 60m 'check MCP kanban, code task, commit, and push' so that I can automate my entire development lifecycle without manually re-triggering the interpreter or writing custom cron-logic."
Reacted by Kyle Seely, Maarten, viniciusdebruin, Mike Mulhearn, burka, Harm Olthof, nangongwentian-fe, sebastianlungu, Dave Elliott, Brady Stroud [SSW] and 33 more
This issue might be a duplicate of existing issues. Please check:
[FEATURE]: Delayed queue feature #5408: Delayed queue feature — also requests the ability to queue/loop tasks for automated iterative execution without manual re-triggering
Please review that issue and consider whether your request is covered there or adds something distinct.
Key aspects of their implementation worth considering:
Fixed interval mode: /loop 5m <prompt> runs the prompt every N minutes/hours.
Dynamic/self-paced mode: /loop <prompt> (no interval) lets the model decide when to wake itself up based on what it's waiting for — e.g., poll a build every 60s vs. check an idle queue every 30min. This avoids burning prompt-cache TTL (5min on Anthropic) with pointless short sleeps.
Stop conditions: the loop ends when the model decides there's nothing left to do, or the user interrupts.
Autonomous variant: a sentinel prompt that fires without user input for fully unattended runs.
The dynamic-pacing piece is what makes it meaningfully different from just wrapping cron or a bash while loop — the agent picks its own cadence based on what it's actually waiting for.
Related: #11232 (Native Scheduling for Opencode) — overlapping scope. A native scheduler could provide the underlying primitive that /loop builds on top of (fixed-interval mode), while /loop's dynamic self-paced mode is a distinct capability.
guys, i've been testing all morning. will love to get your feedback on it.
Like @yondifon approach here. Isn't the whole point of opencode that the plugin primitive is enough to build which ever functionality you would need. And have community contribution to maintain functionality. Only bringing functionality back in to the core codebase when it's universally agreed upon?
Activity
github-actions commentedon Mar 17, 2026
This issue might be a duplicate of existing issues. Please check:
Please review that issue and consider whether your request is covered there or adds something distinct.
viniciusdebruin commentedon Mar 22, 2026
I need this too
itstamhn commentedon Apr 4, 2026
me too
bradystroud commentedon Apr 15, 2026
+1 on this. For reference, Claude Code shipped a similar feature that could inform the design here:
https://code.claude.com/docs/en/scheduled-tasks#run-a-prompt-repeatedly-with-/loop
Key aspects of their implementation worth considering:
/loop 5m <prompt>runs the prompt every N minutes/hours./loop <prompt>(no interval) lets the model decide when to wake itself up based on what it's waiting for — e.g., poll a build every 60s vs. check an idle queue every 30min. This avoids burning prompt-cache TTL (5min on Anthropic) with pointless short sleeps.The dynamic-pacing piece is what makes it meaningfully different from just wrapping
cronor a bashwhileloop — the agent picks its own cadence based on what it's actually waiting for.bradystroud commentedon Apr 15, 2026
Related: #11232 (Native Scheduling for Opencode) — overlapping scope. A native scheduler could provide the underlying primitive that
/loopbuilds on top of (fixed-interval mode), while/loop's dynamic self-paced mode is a distinct capability.danieliyahu1 commentedon Apr 25, 2026
Anyone one know if there is a plan to add it?
It will be amazing to have it
neuralnexus commentedon May 23, 2026
this would be a good improvement.
huybuidac commentedon Jun 11, 2026
I see OpenCode feature release too slow.
Let see CC: agent-team, dynamic workflow, loop, goal, etc... they create and copy so fast
sabateen2github commentedon Jun 16, 2026
Hi team, any updates?
yondifon commentedon Jun 25, 2026
https://github.com/yondifon/opencode-loop
guys, i've been testing all morning. will love to get your feedback on it.
SheldonGrant commentedon Jul 13, 2026
Like @yondifon approach here. Isn't the whole point of opencode that the plugin primitive is enough to build which ever functionality you would need. And have community contribution to maintain functionality. Only bringing functionality back in to the core codebase when it's universally agreed upon?
github-actions commentedon Sep 12, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.