Merge pull request 'feat(builtin-agent): persist ReAct loop turns as session JSONL' (#434) from feat/turn-jsonl-session into main

This commit is contained in:
2026-05-23 10:48:49 +00:00
70 changed files with 857 additions and 768 deletions
@@ -1,8 +1,5 @@
import { spawn } from "node:child_process";
import type { Store } from "@uncaged/json-cas";
import { createLogger } from "@uncaged/workflow-util";
import {
type AgentContext,
type AgentRunResult,
@@ -11,6 +8,7 @@ import {
getCachedSessionId,
setCachedSessionId,
} from "@uncaged/workflow-agent-kit";
import { createLogger } from "@uncaged/workflow-util";
import { parseClaudeCodeStreamOutput, storeClaudeCodeDetail } from "./session-detail.js";
@@ -149,7 +147,12 @@ async function runClaudeCode(ctx: AgentContext): Promise<AgentRunResult> {
}
return result;
} catch (err) {
log("5VKR8N3Q", "resume failed for session %s, falling back to fresh run: %s", cachedSessionId, err);
log(
"5VKR8N3Q",
"resume failed for session %s, falling back to fresh run: %s",
cachedSessionId,
err,
);
}
}
}