[FEATURE]: Ralph Loop - autonomous task completion without human intervention #6736

Closed
opened 2026-02-16 18:05:06 -05:00 by yindo · 2 comments
Owner

Originally created by @ktsaou on GitHub (Jan 18, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Add a mechanism to repeatedly inject prompts into OpenCode sessions, allowing autonomous task completion without human intervention after the initial prompt.

Use case: When working on multi-step tasks (fixing TODOs, reviewing code, refactoring), users currently need to manually prompt the model to continue after each response. This feature allows the model to continue working automatically until:

  • A completion condition is met (model outputs a specific marker)
  • Maximum iterations reached (safety limit)
  • User cancels the loop

Example usage

# Read TODO and work on it until nothing left to do
/ralph-loop -p "I_DIDNT_FIND_ANYTHING" Read the TODO file and execute all tasks

# Review and fix with iteration limit
/ralph-loop -m 10 -p "ALL_FIXED" Review and fix all type errors

# Cancel if needed
/ralph-loop:cancel

Why is this needed?

Similar to Claude Code's ralph-loop feature, this enables:

  • Hands-off task execution for well-defined work
  • Iteration on complex multi-step tasks
  • Autonomous code review and fixing workflows

Safety considerations

  • Default max 20 iterations, configurable up to 100
  • Completion promise detection to stop when done
  • Cancel command available at any time
  • Server-side state management
Originally created by @ktsaou on GitHub (Jan 18, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Add a mechanism to repeatedly inject prompts into OpenCode sessions, allowing autonomous task completion without human intervention after the initial prompt. **Use case:** When working on multi-step tasks (fixing TODOs, reviewing code, refactoring), users currently need to manually prompt the model to continue after each response. This feature allows the model to continue working automatically until: - A completion condition is met (model outputs a specific marker) - Maximum iterations reached (safety limit) - User cancels the loop ### Example usage ```bash # Read TODO and work on it until nothing left to do /ralph-loop -p "I_DIDNT_FIND_ANYTHING" Read the TODO file and execute all tasks # Review and fix with iteration limit /ralph-loop -m 10 -p "ALL_FIXED" Review and fix all type errors # Cancel if needed /ralph-loop:cancel ``` ### Why is this needed? Similar to Claude Code's ralph-loop feature, this enables: - Hands-off task execution for well-defined work - Iteration on complex multi-step tasks - Autonomous code review and fixing workflows ### Safety considerations - Default max 20 iterations, configurable up to 100 - Completion promise detection to stop when done - Cancel command available at any time - Server-side state management
yindo closed this issue 2026-02-16 18:05:06 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 18, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9199: Ralph behaviour on demand - requests ralph-like functionality for autonomous task execution

Additionally, the following related issues discuss autonomous execution and loop automation that may inform the implementation:

  • #5408: Delayed queue feature - requests ability to queue messages for hands-off execution
  • #5891: Full automation support - requests autonomous task execution without confirmation
  • #8463: Add --dangerously-skip-permissions - related to autonomous workflows
  • #4559: Add configurable spending limit / "Kill Switch" - relevant for loop safety considerations

Feel free to ignore if these don't address your specific case.

@github-actions[bot] commented on GitHub (Jan 18, 2026): This issue might be a duplicate of existing issues. Please check: - #9199: Ralph behaviour on demand - requests ralph-like functionality for autonomous task execution Additionally, the following related issues discuss autonomous execution and loop automation that may inform the implementation: - #5408: Delayed queue feature - requests ability to queue messages for hands-off execution - #5891: Full automation support - requests autonomous task execution without confirmation - #8463: Add `--dangerously-skip-permissions` - related to autonomous workflows - #4559: Add configurable spending limit / "Kill Switch" - relevant for loop safety considerations Feel free to ignore if these don't address your specific case.
Author
Owner

@ktsaou commented on GitHub (Jan 18, 2026):

Closing as duplicate of #9199. PR #9312 implements this feature.

@ktsaou commented on GitHub (Jan 18, 2026): Closing as duplicate of #9199. PR #9312 implements this feature.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6736