code-yeongyu/oh-my-openagent

[Feature]: Add `always_active` config option for ralph-loop

Open

#1238 opened on Jan 29, 2026

View on GitHub
 (4 comments) (0 reactions) (0 assignees)TypeScript (57,825 stars) (4,692 forks)batch import
enhancementhelp wantedtriage:feature-request

Description

Prerequisites

  • I will write this issue in English (see our Language Policy)
  • I have searched existing issues and discussions to avoid duplicates
  • This feature request is specific to oh-my-opencode (not OpenCode core)
  • I have read the documentation

Problem Description

Currently, ralph-loop must be explicitly invoked with /ralph-loop "task" for each session. For users who want the "work until done" behavior as their default workflow, this requires:

  1. Remembering to start every task with /ralph-loop
  2. Re-invoking /ralph-loop after session restarts
  3. Extra friction for teams who've adopted ralph-loop as their standard practice

Many power users (myself included) find that ralph-loop's iterative completion model is superior to the default "respond once and stop" behavior. We'd like to make it the default without modifying prompts.

Proposed Solution

Add an always_active configuration option to ralph_loop:

{
  "ralph_loop": {
    "enabled": true,
    "default_max_iterations": 100,
    "always_active": true  // NEW: Auto-activate ralph-loop for all prompts
  }
}

Behavior when always_active: true:

  • Every user prompt automatically triggers ralph-loop behavior
  • Agent continues working until <promise>DONE</promise> is detected
  • Same iteration limits and completion detection as /ralph-loop
  • Can still be cancelled with /cancel-ralph

Implementation Suggestion

Leverage the existing keyword-detector hook pattern:

// In keyword-detector or new UserPromptSubmit hook
if (config.ralph_loop.always_active) {
  // Inject ralph-loop mode into session state
  // Similar to how "ultrawork" mode is auto-activated
}

Alternatively, the Stop hook could check config.ralph_loop.always_active in addition to checking for the state file.

Alternatives Considered

Alternative Why Not Ideal
Always prefix prompts with /ralph-loop Tedious, error-prone, easy to forget
Modify system prompt to include ralph behavior Doesn't leverage the Stop hook's continuation mechanism
Custom UserPromptSubmit hook Would work but requires users to write code; should be built-in
Use /ulw-loop always Same problem - still requires explicit invocation

Use Cases

  1. Teams with "always iterate" policy - Organizations that want agents to work autonomously until completion
  2. Complex projects - Where tasks naturally require multiple iterations
  3. Background workflows - Where ralph-loop's continuation model is expected behavior

Related Issues

  • #952 - ralph-loop not loading (existing bugs)
  • #900 - ralph-loop argument parsing
  • #1233 - Ralph Loop completion detection

Doctor Output (Optional)

N/A - this is a feature request

Additional Context

The keyword-detector hook already sets modes based on keywords (ultrawork, search, analyze). Adding ralph-loop as an "always on" mode would follow the same architectural pattern but triggered by config rather than keywords.

Feature Type

Configuration Enhancement

Contribution

  • I'm willing to help with testing
  • I can help with documentation

Contributor guide