Skip to content

Commit f550fb8

Browse files
saphidclaude
andcommitted
refactor(codex): name the resume span
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 4a7c290 commit f550fb8

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6697,9 +6697,12 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* (
66976697
});
66986698

66996699
// Codex refuses to resume a session archived elsewhere until it is unarchived.
6700-
const resumeNativeThread = (threadId: string, params: Record<string, unknown>) => {
6700+
const resumeNativeThread = Effect.fn("CodexAdapterV2.resumeNativeThread")(function* (
6701+
threadId: string,
6702+
params: Record<string, unknown>,
6703+
) {
67016704
const resume = client.raw.request("thread/resume", { threadId, ...params });
6702-
return resume.pipe(
6705+
return yield* resume.pipe(
67036706
Effect.catchTags({
67046707
CodexAppServerRequestError: (cause) =>
67056708
/\bsession \S+ is archived\b|\bcodex unarchive\b/i.test(cause.errorMessage)
@@ -6709,7 +6712,7 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* (
67096712
: Effect.fail(cause),
67106713
}),
67116714
);
6712-
};
6715+
});
67136716

67146717
const startNativeTurn = Effect.fn("CodexAdapterV2.startNativeTurn")(
67156718
function* (

0 commit comments

Comments
 (0)