Repository navigation
fix: bound delegated recall and reserve answer time - #1282
Open
igs-rogenlo wants to merge 1 commit into
Open
igs-rogenlo wants to merge 1 commit into
igs-rogenlo wants to merge 1 commit into
Conversation
igs-rogenlo
marked this pull request as ready for review
November 5, 2026 04:56
This was referenced Nov 7, 2026
This branch has not been deployed
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.
Delegated
lcm_expand_querynavigation can keep issuing tools after retrieval stops yielding source content. The source-token grant does not bound tool turns: residual budgets can repeatedly return zero-token expansions without being exhausted, and the child reaches its work deadline without a final answer.This adds an executable transition from navigation to a bounded, tool-free evidence answer. Ordinary terminal child replies keep their existing path.
Changes
runtime.llm.completecall. Synthesis has no tools, uses the original work deadline and cancellation signal, and validates citations against the selected seed bucket.truncated: true; report insufficient evidence explicitly. A cleanup failure prevents synthesis. A synthesis policy rejection does not spawn another navigator or retry on another model.Model policy and scope
The answer pass uses the canonical expansion model (or the model observed in the child). It is checked by OpenClaw's
llmmodel policy, separately from the existingsubagentpolicy; README examples and tool docs now show both. No allowlist is automatically widened.enableSummaryThinking: falsealso requests non-thinking synthesis. Existing compaction callers retain their default purpose.This is separate from source-message delivery in #1080 / #1261, Code Mode envelopes in #1250, and shared cross-conversation deadlines in #994. It does not attempt the broader deterministic accounting proposed in #575; observed grant debits are only a lower bound on returned source-token estimates.
Evidence and validation
Two redacted local traces motivating this change reached 71 and 87 assistant tool-use turns with reasoning disabled and no final answer. They retained 84 and 126 tokens of a 4,000-token expansion grant; 10/19 and 41/45 expansion calls returned zero tokens. No original prompts, transcripts, credentials, account identifiers, or production data are included in this PR.
c3745b0; the broader new convergence scenarios yield seven failures and two control passes before the fix.plugin-tool-session-scopeandplugin-reload-generationshit their 30-second test harness deadlines; the scope test also times out on untouched upstream. Reload-generations passed the focused selection. Neither timeout was reproduced in GitHub CI on Node 22. No product timeout was changed.git diff --checkpassed. Local validation remains distinct from live model acceptance.Production validation
The correction has been installed as a scoped overlay on a production OpenClaw 2026.10.7 instance. The native plugin reload advanced its runtime generation without a Gateway restart; model policy, endpoints, and product budgets stayed unchanged.
A real-data query with the original normalized prompt/seed/numeric parameters completed in 52.354 seconds, returning a 2,272-character partial answer with two citations verified inside the original conversation. Seven source messages / 4,813 characters matched stored source parts and were visible to the navigator; five retained content beyond character 200. The navigator used Qwen with thinking off and reported zero reasoning tokens.
Its archive contains 20 assistant turns, all
toolUse, and no JSON answer. Replaying the deployed progress code against those messages reportsno_progress(22 model-issued tool calls, four consecutive no-progress results, 32,000 retained evidence characters). The owned navigator was archived before the tool returned its answer. Together with the deployed control flow, this verifies the bounded evidence-answer path rather than treating a healthy load as answer acceptance.Limits of this evidence:
truncated: true. Full semantic sufficiency of the business answer is not established.client.connectionSignal. Only transport waiting was separated; the parent limit (150 seconds), original tool timeout (150 seconds), and output limit (1,500 tokens) were unchanged.The limits deliberately produce partial evidence rather than asserting that the store has no answer. No original prompts, transcripts, source text, credentials, or account identifiers are included here.
中文摘要
修正委派檢索持續查找、沒有收斂成答案的機制:以程式控制無進展/工具呼叫/時間邊界,先清理本次子任務,再用已取得證據做一次不帶工具的回答。保留原授權與額度;未完成範圍明示截斷或資料不足。已在正式真資料查詢驗到Qwen/off、本文與有效引用,並確認導航停止後能回傳部分答案;自然委派流量與完整業務語義品質仍待觀察。
AI assistance: implemented and tested with OpenAI Codex. All committed fixtures are synthetic.