fix(goal): prevent premature goal continuation with async sessions#1694
Open
1688mengdie wants to merge 2 commits into
Open
fix(goal): prevent premature goal continuation with async sessions#16941688mengdie wants to merge 2 commits into
1688mengdie wants to merge 2 commits into
Conversation
added 2 commits
July 23, 2026 04:05
8 preset team configurations (standard/quick/parallel/single/review/audit/plan/custom). Enables one-click multi-agent legion deployment from UI. @wsp1911 Ref: GCWing#1674
Add dual-condition check before goal auto-continuation: - Skip when queued messages exist (queues.has_items) - Skip when any session has an active turn (!active_turns.is_empty) Goal checks now only fire when all sessions are idle and the queue is drained — preventing premature continuation when async SessionMessage replies are still in flight. Add ActiveDialogTurnStore::is_empty() convenience method.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
修复 Goal 模式自动续接(continuation)在异步 SessionMessage 场景下的过早触发问题。
根因
Commander 派发 SessionMessage 后 turn 结束。Goal 检查在 turn 完成后立即触发——此时异步 SessionMessage 回复还在路上。单条件检查(仅 queues)不足以判断系统是否真正空闲。
修复
影响
Ultra Mode 多 Agent 编排的核心稳定性修复。防止 Goal 在子 Agent 未完成时误触发下一轮。
验证
Ref: #1674