fix(cli): disable Hermes startup type-ahead - #342
Merged
deepcoldy merged 1 commit intoJul 2, 2026
Conversation
deepcoldy
pushed a commit
that referenced
this pull request
Jul 3, 2026
Hermes 无 claude 式 settings/hooks 注入面、❯ 屏幕检测在启动屏有假命中前科(#340/#342),改为显式真就绪信号: - hermes 适配器设 injectsReadyHook,worker 对此类适配器注入 BOTMUX_READY_COMMAND env(= node cli.js session-ready),Hermes 在 prompt_toolkit composer 真渲染后 shell 执行它 - tmux 后端 env 白名单透传该 key(会话定位靠已白名单的 BOTMUX_SESSION_ID / BOTMUX_LARK_APP_ID) - session_ready 释放 ready-gate 后经 PTY settle 走 markPromptReady(权威就绪);45s 超时 fallback 保持保守语义(只开闸不强标就绪) - review 修复(Claude):ReadyGate.receive() 一次性语义会让 45s fallback 吞掉冷启动 2-3 分钟 Hermes 的迟到真信号,机制在目标场景失效——session_ready 现在检测 late-after-fallback,首轮(awaitingFirstPrompt)直接兑现 markPromptReady;clear/compact 中途信号保持 no-op 降级安全:不支持该 env 的旧 Hermes 退回 ❯ 检测路径,无回归。跨仓库契约(Hermes shell 执行该 env)由作者侧 Hermes 实现保证。 Codex 独立二审通过(lateAfterFallback 取值时机、awaitingFirstPrompt 守卫、settle 并发窗口幂等均核验;294/294 + 22/22 + tsc 绿)。
deepcoldy
added a commit
that referenced
this pull request
Jul 29, 2026
去掉 hermes 适配器的 injectsReadyHook,回到 ❯ readyPattern 检测,消除 45s ready-gate 死等。 根因:#353 假设 Hermes 会 shell 执行 BOTMUX_READY_COMMAND(跨仓库契约),但线上 v0.18.2 从未兑现,信号永不发→worker 空等满 45s fallback 才放行(真 ❯ 输入框 ~3.6s 就出现)。保留 deferFirstPromptTimeoutUntilReady(首条排队到真 ❯,90s 硬顶),不开 type-ahead(#342 静默吞消息风险仍被挡)。 影响面:只动 hermes 单适配器 + 陈旧注释,worker.ts diff 纯注释;claude-code/grok 有真 hookInstall 不受影响。 Review:Claude 首审 + Codex 复审收敛,default skin 冷启动 45s→~8s 严格净改善;非 ❯ skin 的 90s 交付是 #340 起既有局限(非本 PR 回归),skin-independent 就绪检测列 follow-up。合当前 master 无冲突、build 绿、411 单测过(codex 追加全量 11093 passed)。 Co-Authored-By: 申晗 <xu4wang@gmail.com> Co-Authored-By: Riff <noreply@riff.dev>
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.
No description provided.