Skip to content

fix(buzz-acp): raise MODELS_TIMEOUT to 60s so slow-start agents don't fail models/probe subcommands - #6564

Open
paramiao wants to merge 1 commit into
block:mainfrom
paramiao:fix/buzz-acp-models-timeout-60s
Open

fix(buzz-acp): raise MODELS_TIMEOUT to 60s so slow-start agents don't fail models/probe subcommands#6564
paramiao wants to merge 1 commit into
block:mainfrom
paramiao:fix/buzz-acp-models-timeout-60s

Conversation

@paramiao

Copy link
Copy Markdown

UPSTREAM-PR-DESC — buzz-acp models 超时修复 PR 草稿

  • 草稿时间: 2026-08-23 · itops · huanxi-buzz v1 收尾 D2
  • 目标仓库: github.com/block/buzz(main 分支,草稿基线 = commit f995325,2026-08-22 HEAD)
  • 配套 diff: 同目录 UPSTREAM-PR-DRAFT.patch(干净可提交形态;本地 fork 版含标注注释,在 /home/mk/buzz-huanxi/build/models-timeout.patch
  • ⚠️ 状态: 草稿,未提交。实际 push 到 GitHub 前需 main 最终确认(外部发布动作)。

PR Title(建议)

fix(buzz-acp): raise MODELS_TIMEOUT to 60s so slow-start agents don't fail `models`/probe subcommands

PR 描述(建议正文)

Problem

buzz-acp lightweight helper subcommands (models, methods, and the initialize probe path) are
guarded by a hardcoded MODELS_TIMEOUT = 10s (crates/buzz-acp/src/lib.rs, const MODELS_TIMEOUT).
Any ACP agent whose process spawn + initialize handshake takes longer than 10s cold fails these
subcommands with error: agent timed out (10s), even though the agent is fully functional.

Reproducible case: openclaw acp (Node.js-based ACP server, v2026.7.1) takes ~11.4s from spawn to
first initialize response on a cold start. Result:

$ BUZZ_ACP_AGENT_COMMAND=openclaw BUZZ_ACP_AGENT_ARGS=acp,--session,<id> buzz-acp models
error: agent timed out (10s)

Meanwhile the runtime agent-pool path already uses a 60s timeout for the exact same
client.initialize() call, so the runtime bridge works fine while the helper subcommands fail —
inconsistent behavior for the same operation.

Proposed fix (minimal)

Raise the helper-subcommand timeout constant from 10s to 60s, matching the runtime agent-pool
initialize timeout. Single-constant change, no behavior change for fast agents beyond a later
timeout error.

Alternative (happy to switch if preferred): make it configurable, e.g.
BUZZ_ACP_MODELS_TIMEOUT env var with a 60s default — useful for agents with even slower cold
starts (JVM, heavy Python envs). We kept the minimal diff here since 60s already matches the
runtime path constant.

Evidence

  • Cold-start timing: initialize first response at 11.44s, session/new at 12.19s (measured against
    openclaw-acp v2026.7.1-2, stdio probe).
  • Official binary: modelserror: agent timed out (10s) (reproduced twice).
  • Patched binary (only this constant changed): models → exit 0, agent identity reported correctly;
    runtime agent-pool behavior unchanged.

Testing

  • buzz-acp models against openclaw ACP agent: timeout → PASS after patch
  • buzz-acp models --json: structured agent name/version output correct
  • 25s full bridge run: agent_pool_ready agents=1 (runtime path unaffected)
  • cargo test suite on CI (upstream)

提交前 checklist(itops 执行,待 main 确认后进行)

  1. fork block/buzz 到可发布账号(不使用个人机器凭据之外的新凭据;gh auth 现有身份)
  2. 基于最新 upstream main 重做分支(草稿基线 f995325 可能已漂移;单 hunk 补丁上下文足够小,重放低风险)
  3. git diff 重新生成(UPSTREAM-PR-DRAFT.patch 的 index hash 是草稿基线的,正式提交前需重算)
  4. PR 正文 = 上面建议内容(去掉内部路径/内部项目名,替换为通用表述)
  5. push + 开 PR,回填 PR URL 到 CLOSEOUT 文档

内部注意

  • 提交内容不得包含任何密钥/私钥/内部域名/内部路径(本文件与 patch 已审查:无)
  • patch 仅含 1 行常量变更 + doc comment 上下文,无敏感信息

buzz-acp helper subcommands (models/methods/initialize probe) use a hardcoded
10s timeout, but cold-starting ACP servers (e.g. Node-based openclaw acp,
~11.4s to first initialize response) fail the probe despite being functional.

Raise the helper-subcommand timeout constant to 60s, matching the runtime
agent-pool initialize timeout for consistent behavior.

Alternative considered: env-configurable timeout (BUZZ_ACP_MODELS_TIMEOUT);
kept minimal single-constant change here.
@paramiao
paramiao requested a review from a team as a code owner August 22, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant