Compare commits

...

1 Commits

Author SHA1 Message Date
xiaoju cfd864e41a fix: add debug logging for session detail fallback path
When uwf-hermes falls back to raw text detail, log the reason:
- session_id parsed but session file not found
- session_id not parsed (with stderr/stdout preview)

This helps diagnose intermittent structured detail loss (#380).
2026-05-22 08:21:37 +00:00
@@ -107,6 +107,13 @@ async function runHermes(ctx: AgentContext): Promise<AgentRunResult> {
const { detailHash, output } = await storeHermesSessionDetail(store, session);
return { output, detailHash };
}
process.stderr.write(`uwf-hermes: session file not found for ${sessionId}\n`);
} else {
const stderrPreview = stderr.slice(0, 200).replace(/\n/g, "\\n");
const stdoutPreview = stdout.slice(0, 200).replace(/\n/g, "\\n");
process.stderr.write(
`uwf-hermes: no session_id parsed. stderr=${stderrPreview} stdout=${stdoutPreview}\n`,
);
}
const detailHash = await storeHermesRawOutput(store, stdout);