This commit is contained in:
Julius Marminge committed 2026-06-13 22:46:37 -07:00
1 parent acc41f4742
commit dbb184bb8a
59 files changed
+2364 -1228

No files matched your search

@@ -9,13 +9,13 @@ import { ProviderInstanceId, type ProviderReplayEntry } from "@t3tools/contracts
import * as Console from "effect/Console";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
import * as Random from "effect/Random";
import {
makeClaudeQueryOptions,
makeClaudeUserMessage,
type ClaudeAgentSdkQueryOptions,
} from "../src/orchestration-v2/Adapters/ClaudeAdapterV2.ts";
import { randomUuidV4 } from "../src/orchestration-v2/RandomUuid.ts";
import { makeCheckpointWorkspace } from "../src/orchestration-v2/testkit/ReplayFixtureWorkspace.ts";
const SCENARIO = "thread_fork_native_fork_local_rollback";
@@ -227,7 +227,7 @@ const pathFragments = [
[process.env.HOME ?? "", "/home/replay-user"],
] as const;
const sessionId =
process.env.T3_CLAUDE_REPLAY_SESSION_ID ?? (await Effect.runPromise(Random.nextUUIDv4));
process.env.T3_CLAUDE_REPLAY_SESSION_ID ?? (await Effect.runPromise(randomUuidV4));
const entries: Array<ProviderReplayEntry> = [];
const metadata: Record<string, unknown> = {
prompts: [SOURCE_PROMPT, FORK_FIRST_PROMPT, FORK_SECOND_PROMPT, FORK_AFTER_ROLLBACK_PROMPT],
@@ -20,6 +20,8 @@ import {
PROVIDER_THREAD_RESUME_FIRST_PROMPT,
PROVIDER_THREAD_RESUME_SECOND_PROMPT,
SIMPLE_PROMPT,
SUBAGENT_CONTINUE_PARENT_PROMPT,
SUBAGENT_CONTINUE_PROMPT,
SUBAGENT_PROMPT,
THREAD_ROLLBACK_AFTER_PROMPT,
THREAD_ROLLBACK_FIRST_PROMPT,
@@ -64,6 +66,7 @@ const SCENARIO_NAMES = [
"tool_call_workspace_never",
"tool_call_restricted_granular",
"subagent",
"subagent_continue",
"multi_turn",
"provider_thread_resume",
"todo_list",
@@ -411,6 +414,31 @@ function scenarios(): ReadonlyArray<ReplayScenario> {
},
],
},
{
name: "subagent_continue",
fileName: "subagent_continue.ndjson",
description:
"A root turn spawns one native Codex subagent, then a later root turn resumes and messages the same child thread.",
runs: [
{
name: "continued-subagent",
description:
"The second root turn asks Codex to continue the subagent created by the first root turn.",
steps: [
{
type: "turn",
label: "spawn-subagent",
prompt: SUBAGENT_CONTINUE_PROMPT,
},
{
type: "turn",
label: "continue-subagent",
prompt: SUBAGENT_CONTINUE_PARENT_PROMPT,
},
],
},
],
},
{
name: "multi_turn",
fileName: "multi_turn.ndjson",