fix(codex): fork archived sessions without reopening the source (#2231)

* fix(codex): fork archived sessions without reopening the source

* fix(codex): reconcile interrupted archived fork recovery

* fix(codex): release rejected forks and serialize source startup

* fix(codex): fence unconfirmed resume startup across retries

* test(codex): validate durable resume recovery and serialize archive

* fix(codex): block local resume of pending archived fork sources

* fix(hub): coalesce concurrent resume requests to preserve idempotent startup

* fix(hub): bypass startup coalescing for PTY sessions
This commit is contained in:
Ananovo
2026-11-01 09:55:01 +08:00
committed by GitHub
parent 639f71b6a6
commit 46bae9b0f1
30 changed files with 1377 additions and 34 deletions
+11
View File
@@ -656,6 +656,17 @@ export type ForkConversationRpcResponse = ForkConversationRpcResult | {
error: string
}
/** Machine-scoped native history operation; never sends a source prompt. */
export const ForkArchivedCodexRequestSchema = z.object({
operationId: z.string().uuid(),
sourceSessionId: z.string().uuid(),
sourceThreadId: z.string().min(1),
directory: z.string().min(1),
boundary: z.object({ localId: z.string().min(1), turnId: z.string().min(1) }).optional()
})
export type ForkArchivedCodexRequest = z.infer<typeof ForkArchivedCodexRequestSchema>
export type ForkArchivedCodexResponse = { nativeSessionId: string } | { error: string; rollbackSafe: boolean }
export type RewindConversationErrorCode =
| 'ambiguous_native_boundary'
| 'ambiguous_native_boundary_fork_safe'