fix: uwf-hermes session detail intermittently falls back to raw text #380

Closed
opened 2026-05-22 08:16:48 +00:00 by xiaoju · 1 comment
Owner

现象

Dogfood thread 06F4XC0HV2Y7S10NWYZVZ9C3PR 中,planner 的 detail 是 raw text(CXXS1KVSC0YVJ 类型),而 developer 的 detail 是结构化的(有 model, turns)。

原始诊断

uwf-hermes 缺少 --quiet flag --quiet 早就有了。

调查结论

  • --quiet 一直在 spawn args 里
  • parseSessionIdFromStdout 逻辑正确,先查 stderr 再查 stdout
  • 本地复现测试通过:planner step 产出结构化 detail
  • 无法复现原始问题,推测是偶发的 session 文件写入时序问题(hermes 进程退出时 session json 尚未完全 flush)

建议

  1. 加 retry/delay 在 loadHermesSession 失败时重试一次
  2. 或者记录 warning log 方便下次排查

Status

无法复现,降为 low priority。下次再出现时带着 debug 信息重新分析。

## 现象 Dogfood thread `06F4XC0HV2Y7S10NWYZVZ9C3PR` 中,planner 的 detail 是 raw text(`CXXS1KVSC0YVJ` 类型),而 developer 的 detail 是结构化的(有 `model`, `turns`)。 ## 原始诊断 ~~`uwf-hermes` 缺少 `--quiet` flag~~ ❌ — `--quiet` 早就有了。 ## 调查结论 - `--quiet` 一直在 spawn args 里 - `parseSessionIdFromStdout` 逻辑正确,先查 stderr 再查 stdout - 本地复现测试通过:planner step 产出结构化 detail ✅ - **无法复现原始问题**,推测是偶发的 session 文件写入时序问题(hermes 进程退出时 session json 尚未完全 flush) ## 建议 1. 加 retry/delay 在 `loadHermesSession` 失败时重试一次 2. 或者记录 warning log 方便下次排查 ## Status 无法复现,降为 low priority。下次再出现时带着 debug 信息重新分析。
xiaoju changed title from fix: uwf-hermes missing --quiet flag, session detail fallback to raw text to fix: uwf-hermes session detail intermittently falls back to raw text 2026-05-22 08:21:03 +00:00
xiaoju reopened this issue 2026-05-22 10:59:39 +00:00
Author
Owner

Reopening: This is not intermittent — it's reproducible when the agent runs git push during a session. The push hook's stdout output (diff review) pollutes Hermes stdout, causing parseSessionIdFromStdout to fail.

Observed in #395 workflow runs: developer step consistently fails because git push output contains diff text that overwhelms the session_id line.

Fix should either:

  1. Redirect agent subprocess stdout/stderr to avoid pollution
  2. Add retry with delay in loadHermesSession
  3. Parse session_id more robustly (search for pattern anywhere in output)

— 小橘 🍊(NEKO Team)

Reopening: This is not intermittent — it's reproducible when the agent runs `git push` during a session. The push hook's stdout output (diff review) pollutes Hermes stdout, causing `parseSessionIdFromStdout` to fail. Observed in #395 workflow runs: developer step consistently fails because git push output contains diff text that overwhelms the session_id line. Fix should either: 1. Redirect agent subprocess stdout/stderr to avoid pollution 2. Add retry with delay in `loadHermesSession` 3. Parse session_id more robustly (search for pattern anywhere in output) — 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#380