Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Codex /goal resume tracks the goal turn Codex already started #35440

Openjuliusmarmingewants to merge 2 commits intomain fromrefs/pull/35440/headopened View on GitHub

Showing 2 changed files with 126 additions and 10 deletions.

x
0 of 2 viewed, 2 left
66 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -9595,6 +9595,72 @@
+ it.effect("/goal resume tracks the goal turn Codex already started", () =>
+ Effect.gen(function* () {
+ const requests: string[] = [];
+ const transcript = makeCodexReplayTranscript({
+ scenario: "goal-resume-running",
+ entries: [
+ ...sessionStart,
+ // Codex restores an active goal on thread/resume and starts its turn on its own.
+ notification("goal restored", "thread/goal/updated", {
+ threadId: nativeThreadId,
+ goal: codexGoal("active", 0),
+ }),
+ notification("native goal turn", "turn/started", {
+ threadId: nativeThreadId,
+ turn: makeCodexReplayTurn({ id: "native-goal-turn", status: "inProgress" }),
+ }),
+ ...request(
+ 3,
+ "thread/goal/get",
+ { threadId: nativeThreadId },
+ { goal: codexGoal("active", 0) },
+ ),
+ notification("goal complete", "thread/goal/updated", {
+ threadId: nativeThreadId,
+ turnId: "native-goal-turn",
+ goal: codexGoal("complete", 10),