Repository navigation
Conversation
When a model produces a visible text reply but no tool_calls, the turn loop breaks immediately (line 643). Normal sessions end here by design. But goal_mode has a documented contract: only task_status done/question should end the session. The existing should_retry_no_tool_task_status() already returns true for goal_mode, but the visible_reply break at line 643 fires first, making the retry path unreachable. Models that don't include task_status in their first command_run batch (e.g. non-OpenAI models) get their goal_mode session terminated after a single visible reply. Fix: in goal_mode, when visible_reply exists but no tool_calls are present, route through the existing retry mechanism instead of breaking. The retry is bounded by should_continue_no_tool_task_status_retry(), which respects the global manas_max_turns limit. Verified: mimo-v2.5-pro completes a 6-turn coding task end-to-end (read -> task_status doing -> apply_patch -> test -> task_status done) with this fix applied. Signed-off-by: Minxi Hou <houminxi@gmail.com>
|
hi, HouMinXi, The existing balanced mode is already very robust. I once ran it continuously for 37 hours without encountering any issues. You can increase the maximum number of turns to use the Tura runtime for very long-horizon tasks. The default is 256, which means the runtime will be forced to stop on the 257th provider call. This limit was introduced because earlier versions of Tura were less stable and could occasionally produce extremely long-tail executions, posing a risk when running long-horizon tasks. I will not merge the PR for now, Because I think there will be other issues with the goal mode,A |
Problem
When a model produces a visible text reply but no
tool_calls, the turn loop breaks immediately (process.rs:643). This is correct for normal sessions, butgoal_modehas a documented contract: onlytask_status: doneortask_status: questionshould end the session.The existing
should_retry_no_tool_task_status()already returnstrueforgoal_mode, but thevisible_replybreak at line 643 fires first, making the retry path unreachable.This causes models that don't include
task_statusin their firstcommand_runbatch (e.g. non-OpenAI models accessed via OpenAI-compatible endpoints) to have theirgoal_modesession terminated after a single visible reply.Root cause
In the original squash commit (
05e4bd4), there was nogoal_modeand novisible_replycheck. In v0.1.33 (a79d322), both were added simultaneously, but thevisible_replybreak was placed before thegoal_moderetry logic. Since GPT-5.6 always includestask_statusin its firstcommand_runbatch, thevisible_replypath was never triggered, and the bug was never discovered.Fix
In
goal_mode, whenvisible_replyexists but notool_callsare present, route through the existing retry mechanism instead of breaking. The retry is bounded byshould_continue_no_tool_task_status_retry(), which respects the globalmanas_max_turnslimit.Testing
process.rstests passmimo-v2.5-procompletes a 6-turn coding task end-to-end (read → task_status doing → apply_patch → test → task_status done) with this fix appliedVerification
Signed-off-by: Minxi Hou houminxi@gmail.com