fix: parse session_id from stderr — hermes --quiet writes it there #348
Reference in New Issue
Block a user
Delete Branch "fix/348-session-id-stderr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Parse session_id from stderr in addition to stdout.
Why
Verified on Mac:
hermes chat --quietoutputssession_id: xxxto stderr, AI response to stdout. The agent only parsed stdout → session_id never found → detail fell back to raw output (previously empty string, now has content after #347 but still not the full merkle session detail).Evidence
Changes
hermes.ts—spawnHermesChatreturns{ stdout, stderr }instead of just stdoutrunHermes— checks stderr first for session_id, falls back to stdoutRef
Refs #342
LGTM ✅ stderr 优先查找 session_id,stdout fallback,detail 存纯 stdout。治本了。