fix(cluster): surface remote spawn LLM errors & fix self-target spawn deadlock#192
Merged
Merged
Conversation
…awn deadlock Cross-hub spawn silently failed in three ways that compounded into an unactionable "empty result / already registered" symptom: - An ephemeral agent whose model has no provider on the target hub errored on resolve_provider but the loop fell through to "idle, exiting", reporting a falsely-successful empty Goal. Now an unrecovered turn error terminates with TerminateReason::Error and the real error text as the result, so the caller sees "Model not found" instead of nothing. - The Agent tool's `model` param had no description, so the LLM guessed "sonnet" (unsupported on the remote hub). Documented that omitting it inherits the parent model and that cross-hub forwards the name verbatim. - A hub targeting itself pre-registered a shadow then routed back through MetaHub into its own registry, colliding as "already registered" and orphaning a forked process. Self-target now spawns locally.
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.
Summary
model字段补上引导文案,从源头阻止 LLM 猜测不被支持的模型。Changes
loopal-runtime/src/agent_loop/run.rs— ephemeral agent 遇未恢复 turn 错误立即终止,返回TerminateReason::Error+ 真实错误文本作为 result。loopal-agent/src/tools/collaboration/agent.rs—model字段补 description:留空继承父模型;跨 hub 原样透传,不支持的 model 会Model not found。loopal-agent-hub/src/dispatch/spawn_routing.rs— 抽出is_self_target纯函数,自指 spawn 改走本地,避免 shadow 与回转注册撞名 + orphan 进程。loopal-runtime/tests/agent_loop/run_test.rs— 新增 ephemeral 未解析 model 的错误回传回归测试;spawn_routing.rs内联 self-target 单测。Test plan
loopal-runtime/loopal-agent-hub/loopal-agent的 unit + 集成测试全部通过