fix: add debug logging for session detail fallback (#380) #381

Closed
xiaoju wants to merge 1 commits from fix/380-hermes-quiet-flag into main
@@ -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);