Skip to content

[Bug] Dispatcher agent lane task ~50s idle delay before dispatch complete #91386

Description

@Macofee

现象

Dispatcher agent(默认 agent)的飞书回复延迟 50-60 秒,即使是最简单的消息(如 "OK")。其他 agent(knowledge/coder/document-assistant)在同一环境下回复仅需 6-12 秒。

排查过程(排除项)

  • ❌ 飞书推送延迟 — TRACE enqueue → dispatch complete 仅 <1s
  • ❌ streaming 卡顿 — 开关 streaming 无影响
  • ❌ MiniMax-M3 模型慢 — 切换到 deepseek-v4-flash 同样 55s
  • ❌ memory 臃肿 — 清理到 1 个文件(769B)无改善
  • ❌ thinkingDefault — offadaptive 无改善
  • ❌ 网络延迟 — curl API 响应 <2s,ping <25ms
  • ❌ models.json 配置 — 修复后无改善

根因:Debug 日志证据

开启 logging.level: debug 后,dispatcher 的一次完整 dispatch trace:

17:27:21.612   dispatching to agent
17:27:21.649   message queued (queueDepth=1)
17:27:21.950   lane dequeue (waitMs=1)
17:27:22.087   [model-fetch] START provider=minimax api=anthropic-messages
17:27:26.459   [model-fetch] RESPONSE status=200 elapsedMs=4371 ← 模型仅 4.4s
17:27:27.084   session state: idle (reason="run_completed") ← run 在 6s 完成
... (无活动 47 秒) ...
17:28:14.466   lane task done: durationMs=52515 active=0 queued=0 ← 52.5s!
17:28:15.195   dispatch complete
  • 模型推理:4.4 秒
  • session run_completed:6 秒
  • lane task done → dispatch complete:47 秒凭空消失
  • lane task done: durationMs=52515 — lane 调度器总共花了 52.5 秒

模型 4 秒出结果,lane 调度器空闲等待了 47 秒才把结果送出去。

环境

  • OpenClaw 2026.6.1
  • macOS 26.5.1 (arm64)
  • Feishu channel, WebSocket mode
  • Dispatcher agent: "default": true
  • 模型: minimax/MiniMax-M3(也测试过 deepseek/deepseek-v4-flash,相同结果)

复现

在飞书给 dispatcher(默认 agent)发送任意消息,观察 openclaw logslane task donedurationMs

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions