mirror of
https://github.com/mikeyobrien/ralph-orchestrator.git
synced 2026-04-25 07:05:57 +03:00
[GH-ISSUE #148] RFC: CLI and TUI guidance injection for human-in-the-loop steering #56
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ralph-orchestrator#56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LuoAndOrder on GitHub (Feb 2, 2026).
Original GitHub issue: https://github.com/mikeyobrien/ralph-orchestrator/issues/148
The Problem
You're watching Ralph work through a task. You notice it's about to spend three iterations debugging the wrong file, or it's not aware that the v1 API endpoint is deprecated, or you just remembered a critical detail that isn't in the codebase.
Right now, your options are:
What you want to do is just type "check
auth.rsnotauth_old.rs" and have Ralph pick that up on the next iteration.Proposal
Add CLI and TUI interfaces for injecting guidance into running loops:
Or press
gin the TUI to open a guidance modal while watching progress.The guidance appears as
## ROBOT GUIDANCEin the next iteration's prompt—same as the existing Telegram integration, just without needing Telegram.Why This Matters
1. Course correction without restart
Nudge Ralph back on track without losing progress. One sentence of guidance can save 5+ wasted iterations.
2. Inject knowledge the agent can't infer
3. Real-time collaboration
Instead of "set and forget," you can actively pair with Ralph—watching progress, offering hints when stuck, and steering toward your preferred approach.
4. Lower friction than Telegram
The RObot/Telegram system is powerful for async monitoring and team visibility. But for developers already in a terminal watching Ralph work, switching to a phone app just to say "try the other approach" is unnecessary friction.
Technical Approach
Both interfaces write the same
human.guidanceevents that Telegram already uses:No changes to core orchestration logic—just new ways to write the same event type.
CLI
TUI
gto open guidance modalOpen Questions
gfor guidance intuitive?Implementation
I've drafted a detailed spec and am happy to implement this and submit a PR. The changes touch:
ralph-cli: Newguidancesubcommand (~100 lines)ralph-tui: Guidance modal and state management (~400 lines)ralph-core: Shared event-writing function extracted from telegram handler (~50 lines)Would love feedback on the approach before diving into implementation.
@mikeyobrien commented on GitHub (Feb 3, 2026):
Totally agree with high friction. I was thinking about adding a new
ralph chatcommand, but this might be a better middle-ground. Ralph is not meant to be chat with, it's to be delegated and directed.In addition to the
guidancecommand/keybind, thoughts on a pop-up modal when the loop requests interaction? The intention was always to have multiple interaction models, telegram being the first due to all the OpenClaw hype and I was curious on how easy it was to setup.@LuoAndOrder commented on GitHub (Feb 3, 2026):
I agree that Ralph is not meant to be chat with. I was originally thinking one way communication from the user back to ralph to help steer it in future iterations or get it unstuck.
But I think there's also merit to your idea of Ralph interrupting itself and ask for help. It needs further thought however. For example:
My recommendation is to start with the User -> Ralph guidance first and then have a discussion on what the Ralph -> User flow should look like. Interested in others' thoughts.
@mikeyobrien commented on GitHub (Feb 3, 2026):
timeout_seconds, it will continue the loop if no response is given.This is a collection I used over the weekend to push the boundaries of what could be done autonomously which worked pretty well. I need more time with it before I decide if I make a generic preset. In short, it's prompted such that the user is only engaged when blocked or the top-level task is complete and is waiting for the new direction.
https://gist.github.com/mikeyobrien/b15d22d7979ecae7cdd3f8f9e34d7337