Skip to content

[codex] 修复 Codex 冷启动首条消息误判裸壳#352

Draft
anarkh wants to merge 1 commit into
masterfrom
codex/fix-codex-startup-ready-gate
Draft

[codex] 修复 Codex 冷启动首条消息误判裸壳#352
anarkh wants to merge 1 commit into
masterfrom
codex/fix-codex-startup-ready-gate

Conversation

@anarkh

@anarkh anarkh commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 给 Codex 适配器开启 deferFirstPromptTimeoutUntilReady,首条消息会等到 readyPattern 或硬超时再 flush
  • 补充适配器单测,防止该启动门控被回退

Root Cause

Codex 冷启动可能超过 worker 的 15s soft first-prompt timeout。超时触发 flush 后,裸壳保护会检查 pane 当前进程;此时 zsh wrapper 仍未进入 Codex composer,导致 botmux 误报“Codex 没真正跑起来”,并阻止首条消息写入。

Impact

入群自动开工或新会话冷启动时,首条 Lark 消息不会因为 Codex 启动慢被误判为裸 shell 失败。

Validation

  • PATH="/Users/bytedance/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/bytedance/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:$PATH" pnpm vitest run --project unit test/cli-adapters.test.ts
  • PATH="/Users/bytedance/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/bytedance/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:$PATH" pnpm build

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