mirror of
https://github.com/mikeyobrien/ralph-orchestrator.git
synced 2026-04-25 23:25:57 +03:00
[GH-ISSUE #123] Loop done when tasks are incomplete #47
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ralph-orchestrator#47
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 @nartc on GitHub (Jan 27, 2026).
Original GitHub issue: https://github.com/mikeyobrien/ralph-orchestrator/issues/123
Hi, thank you for this first of all. I've been using last week and it's been really great.
However, sometimes I notice that the loop looks like it's done (i.e: saying LOOP COMPLETED) but it only completed like 3-4 tasks out of a phase with 15-16 tasks. Rerun
ralph run -P path/to/PROMPT.mdrepeatedly makes it works on more tasks but it never fully completes everything. Some phases it does complete everything, but some phases it doesn't.My flow is:
PRD.mdralph task PRD.mdto break it into tasks ->PROMPT.mdralph run -P path/to/PROMPT.mdThe consequence, when the issue above happens, is that it destroys my claude limit and I'm just guessing here, probably due to it re-reads the PROMPT, process all of the tasks files, and checking / generating specs for those tasks.
Any idea what could go wrong here? Any suggestions?
@nartc commented on GitHub (Jan 27, 2026):
Here's an example of PROMPT.md
and after it says "LOOP COMPLETED", many tasks file have:
status: pendingstill@mikeyobrien commented on GitHub (Jan 27, 2026):
Are you using a hat collection? If not I would try https://github.com/mikeyobrien/ralph-orchestrator/blob/main/presets/confession-loop.yml
I've noticed this occasionally happening too, working on prompt tuning to minimize this as much as possible.
I'd try skipping the
ralph taskstep and prompting withralph run -p "Implement the design in <path-to-file>" -c builtin:confession-loop@nartc commented on GitHub (Jan 27, 2026):
I think I'm using hats with
ralph init --preset spec-driven --agent claude. I'll look at confession loop@mikeyobrien commented on GitHub (Jan 27, 2026):
Models have gotten a lot smarter and with that I've notice how even minor changes in a prompt can have unintended consequences...
It's going to take help from the entire community to get a set of solid hat collections and workflows to build on top of. The current presets are examples of what is technically possible but YMMV.
@nartc commented on GitHub (Jan 27, 2026):
Yeah makes sense. I noticed that this only starts happening when I started polluting the
tasks/directory with previous phase' tasks files.@mikeyobrien commented on GitHub (Jan 27, 2026):
My hunch is the first task decomposition might not include the entire set of tasks necessary to complete the overall objective.
Might need to add more explicit instructions in the meta loop to empower the agent to add any missing tasks it comes across proactively.
@Skinner927 commented on GitHub (Jan 28, 2026):
I'm also having this issue with v2.2.5.
I did not ever have this issue on v2.1.33.
Here's what I've noticed when running
ralph run:.agent/memories.mdis always missing (though I don't see it in old ralph either).agent/scratchpad.mdis never created or written to..agent/tasks.jsonlis missing, but.agent/tasks.jsonl.lockis present..ralph/history.jsonlis missing, but.ralph/history.jsonl.lockis present.Here is my
ralph.ymlshowing my hats. It's a modified version of the spec-driven preset.I have truncated the instructions and left only the lines that instruct how to emit events.
These were always at the end of every instruction.
ralph.yml (click to expand)
Here's the summary of what I can see happened.
tests.verifiedtests.verifiedevent.tests.verifiedevent.tests.verified → Ralph → SpecVerifier.spec.complete.spec.completeandtests.verified.LOOP_COMPLETE, something neither the test_verifier or verifier should have been able to do .console output (click to expand)
I also happened to record the session, but this doesn't look very useful?
recorded-session.jsonl
So, any idea what might be causing this?
@mikeyobrien commented on GitHub (Jan 28, 2026):
I took a deep look at this last night, I think this should stop happening with the latest meta-prompt. I'll be releasing it later today, though the changes are now on main if you want to check it out.
@Skinner927 commented on GitHub (Jan 29, 2026):
I'll definitely give it a shot. Thanks for looking into this, seriously.
Some extra datapoints if it helps:
v2.2.5 did the same thing 3 more times today, only got 1 or 2 steps in and got confused. I even tried simplifying the hats and removing all plugins.
v2.1.3 has been running for the last 5+ hours, no problems, with all the hats and plugins as before.
@mikeyobrien commented on GitHub (Jan 29, 2026):
Thank you for the data points. v2.3.0 is now out. Hopefully this fixes things!
@mikeyobrien commented on GitHub (Jan 29, 2026):
Looks like the regression was introduced with the migration to memory/tasks. I've re-added scratchpad and updated the prompt such that:
Long-term (project-scope -> Memories
Short-term (prompt-scope) -> Scratchpad/Context files
@Skinner927 commented on GitHub (Jan 30, 2026):
I'm going to try the godnight10061/ralph-orchestrator#3 branch shortly, but I'm not sure it'll fix the issue. It looks like it's only checking for incomplete
task/*files? When you run a spec loop, the specs are generated as the first hat in the loop, so there's no spec files to check. Basically, at the end of every loop, all spec files will be completed, the rest haven't been written.I'm not well versed in this magic however, so I'll still give it a test in hopefully an hour.
@mikeyobrien commented on GitHub (Jan 30, 2026):
Haven't run into a premature exit all day today.
🤞
@nartc commented on GitHub (Feb 2, 2026):
I haven't run into a premature exit since last Saturday. I think we can close this issue down and if folks run into it again, they can open new one with new info.