debug: dump raw NDJSON for issue #439 investigation
Saves Claude Code stdout to /tmp/uwf-ndjson-dump/ before parsing. Temporary — remove after root cause confirmed. Refs #439
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { spawn } from "node:child_process";
|
||||
import { mkdirSync, writeFileSync } from "node:fs";
|
||||
import type { Store } from "@uncaged/json-cas";
|
||||
import {
|
||||
type AgentContext,
|
||||
@@ -117,7 +118,17 @@ function spawnClaudeResume(
|
||||
]);
|
||||
}
|
||||
|
||||
const NDJSON_DUMP_DIR = "/tmp/uwf-ndjson-dump";
|
||||
|
||||
async function processClaudeOutput(stdout: string, store: Store): Promise<AgentRunResult> {
|
||||
// Debug dump: save raw NDJSON for issue #439 investigation
|
||||
try {
|
||||
mkdirSync(NDJSON_DUMP_DIR, { recursive: true });
|
||||
writeFileSync(`${NDJSON_DUMP_DIR}/${Date.now()}.ndjson`, stdout);
|
||||
} catch {
|
||||
// ignore dump failures
|
||||
}
|
||||
|
||||
const parsed = parseClaudeCodeStreamOutput(stdout);
|
||||
|
||||
if (parsed !== null) {
|
||||
|
||||
Reference in New Issue
Block a user