fix(codex): resume archived native sessions - #15389
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused Codex adapter bug fix that restores archived sessions through an unarchive-and-resume sequence while preserving unrelated failures. Production behavior is confined to the existing resume path, with targeted tests covering recovery and error handling. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe Codex adapter now unarchives a thread and retries its resume request when Codex returns a matching archived-session error. Replay tests cover recovery, retry failures, and errors that should not trigger unarchiving. ChangesArchived Codex thread recovery
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to The archived-session recovery appears ready to merge after normal checks. No concrete remaining issue is identified in the supplied change context. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Recovery targets the existing saved session and retries once without changing credentials or permissions. No introduced security vulnerability was established. The remaining uncertainty is how session state is reconciled when recovery fails or is interrupted after reactivation. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Note Written by the docstring coverage warning does not require a change for this focused fix. the existing |
## What's Changed * feat(web): Nightly tells you to get the beta mobile app by @t3dotgg in pingdotgg/t3code#15070 * test(server): ACP adapter tests no longer race the prompt settle by @t3dotgg in pingdotgg/t3code#15330 * feat(usage): fold preview model IDs into the model they belong to by @t3dotgg in pingdotgg/t3code#15333 * refactor(server): check RPC scopes in group middleware by @juliusmarminge in pingdotgg/t3code#15324 * feat(mobile): beta Working section hides busy threads until they need you by @t3dotgg in pingdotgg/t3code#15346 * fix(settings): symlinked settings files stay linked when saved by @yordis in pingdotgg/t3code#15009 * fix(server): Stop ends a dev server left running before a provider switch by @t3dotgg in pingdotgg/t3code#15355 * fix(server): merged threads settle even after the agent wakes on its own by @t3dotgg in pingdotgg/t3code#15388 * fix(web): no-project drafts can switch machines by @maria-rcks in pingdotgg/t3code#15356 * fix(web): highlight tool inputs and remove nested work log indentation by @Yash-Singh1 in pingdotgg/t3code#15384 * fix(server): restarts keep delegated tasks, queued threads, and stops intact by @maria-rcks in pingdotgg/t3code#15323 * fix(web): sending past the resume banner compacts first by @maria-rcks in pingdotgg/t3code#15290 * fix(codex): resume archived native sessions by @maria-rcks in pingdotgg/t3code#15389 * feat(web): morph composer and panel action icons by @jakeleventhal in pingdotgg/t3code#14924 * fix(web): subagents sent a follow-up show as running in Lineage by @scratchyone in pingdotgg/t3code#15334 * fix(web): clear stale chat action shortcuts by @maria-rcks in pingdotgg/t3code#15394 * fix(orchestration-v2): restore earlier app agent transcript pages by @Bil0000 in pingdotgg/t3code#14104 * fix(web): remove the square thread info panel shadow by @PixPMusic in pingdotgg/t3code#15069 * fix(mobile): Android usage widget no longer sticks on "Loading widget" in release builds by @tris203 in pingdotgg/t3code#15142 * fix(web): size the model picker to its content by @saphid in pingdotgg/t3code#15152 * test(server): replay checks a Claude subagent's thread takes its reported model by @juliusmarminge in pingdotgg/t3code#15022 * fix(web): subagent finish notifications look like subagent cards by @flamboh in pingdotgg/t3code#15281 * fix(web): thread status dot has an accessible name by @ryanilano in pingdotgg/t3code#14587 * fix(web): legacy sidebar options button has a label by @ryanilano in pingdotgg/t3code#14602 * fix(web): imported themes keep switches and focus rings visible by @flamboh in pingdotgg/t3code#14498 * fix(web): links to issues no longer strand the pull request viewer by @flamboh in pingdotgg/t3code#14242 * fix(web): repo/task breadcrumb no longer bounces when the sidebar collapses by @flamboh in pingdotgg/t3code#15046 * fix(web): Pull request panel entry works for linked PRs by @flamboh in pingdotgg/t3code#15061 * fix(web): add context menu to draft threads in the sidebar by @flamboh in pingdotgg/t3code#10637 * fix(web): keep sidebar branding and build pills from clipping at varying font sizes and zoom levels by @flamboh in pingdotgg/t3code#12141 * fix(usage): model shares and order follow the selected metric by @flamboh in pingdotgg/t3code#11391 * feat(web): sweep sidebar buttons to settle, un-settle, and wake threads by @argofowl in pingdotgg/t3code#14768 * feat: retry a failed workspace preparation by @juliusmarminge in pingdotgg/t3code#15326 ## New Contributors * @argofowl made their first contribution in pingdotgg/t3code#14768 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261003.2638...v0.0.46-nightly.20261004.2644 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261004.2644
## What's Changed * feat(web): Nightly tells you to get the beta mobile app by @t3dotgg in pingdotgg/t3code#15070 * test(server): ACP adapter tests no longer race the prompt settle by @t3dotgg in pingdotgg/t3code#15330 * feat(usage): fold preview model IDs into the model they belong to by @t3dotgg in pingdotgg/t3code#15333 * refactor(server): check RPC scopes in group middleware by @juliusmarminge in pingdotgg/t3code#15324 * feat(mobile): beta Working section hides busy threads until they need you by @t3dotgg in pingdotgg/t3code#15346 * fix(settings): symlinked settings files stay linked when saved by @yordis in pingdotgg/t3code#15009 * fix(server): Stop ends a dev server left running before a provider switch by @t3dotgg in pingdotgg/t3code#15355 * fix(server): merged threads settle even after the agent wakes on its own by @t3dotgg in pingdotgg/t3code#15388 * fix(web): no-project drafts can switch machines by @maria-rcks in pingdotgg/t3code#15356 * fix(web): highlight tool inputs and remove nested work log indentation by @Yash-Singh1 in pingdotgg/t3code#15384 * fix(server): restarts keep delegated tasks, queued threads, and stops intact by @maria-rcks in pingdotgg/t3code#15323 * fix(web): sending past the resume banner compacts first by @maria-rcks in pingdotgg/t3code#15290 * fix(codex): resume archived native sessions by @maria-rcks in pingdotgg/t3code#15389 * feat(web): morph composer and panel action icons by @jakeleventhal in pingdotgg/t3code#14924 * fix(web): subagents sent a follow-up show as running in Lineage by @scratchyone in pingdotgg/t3code#15334 * fix(web): clear stale chat action shortcuts by @maria-rcks in pingdotgg/t3code#15394 * fix(orchestration-v2): restore earlier app agent transcript pages by @Bil0000 in pingdotgg/t3code#14104 * fix(web): remove the square thread info panel shadow by @PixPMusic in pingdotgg/t3code#15069 * fix(mobile): Android usage widget no longer sticks on "Loading widget" in release builds by @tris203 in pingdotgg/t3code#15142 * fix(web): size the model picker to its content by @saphid in pingdotgg/t3code#15152 * test(server): replay checks a Claude subagent's thread takes its reported model by @juliusmarminge in pingdotgg/t3code#15022 * fix(web): subagent finish notifications look like subagent cards by @flamboh in pingdotgg/t3code#15281 * fix(web): thread status dot has an accessible name by @ryanilano in pingdotgg/t3code#14587 * fix(web): legacy sidebar options button has a label by @ryanilano in pingdotgg/t3code#14602 * fix(web): imported themes keep switches and focus rings visible by @flamboh in pingdotgg/t3code#14498 * fix(web): links to issues no longer strand the pull request viewer by @flamboh in pingdotgg/t3code#14242 * fix(web): repo/task breadcrumb no longer bounces when the sidebar collapses by @flamboh in pingdotgg/t3code#15046 * fix(web): Pull request panel entry works for linked PRs by @flamboh in pingdotgg/t3code#15061 * fix(web): add context menu to draft threads in the sidebar by @flamboh in pingdotgg/t3code#10637 * fix(web): keep sidebar branding and build pills from clipping at varying font sizes and zoom levels by @flamboh in pingdotgg/t3code#12141 * fix(usage): model shares and order follow the selected metric by @flamboh in pingdotgg/t3code#11391 * feat(web): sweep sidebar buttons to settle, un-settle, and wake threads by @argofowl in pingdotgg/t3code#14768 * feat: retry a failed workspace preparation by @juliusmarminge in pingdotgg/t3code#15326 ## New Contributors * @argofowl made their first contribution in pingdotgg/t3code#14768 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261003.2638...v0.0.46-nightly.20261004.2644 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261004.2644
archiving a codex session externally makes
thread/resumefail. on current v2, the shared turn-start service silently starts a replacement native session and replays app history. this change catches the specific archived-session error inCodexAdapterV2, callsthread/unarchivefor the same native id, and retries the identical resume once.unrelated errors keep propagating. if unarchive or the retry fails, the existing global fallback may still start a fresh native session; this pr leaves that policy unchanged.
closes #10481. closes #10505. maintainer triage specifies this recovery. replaces the v1 implementation in #10505, closed during the v2 migration.
verification:
vp test run apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tspassed 133 tests, including 11 recovery/failure cases in the existing file. targeted lint and formatting passed; server typecheck exited 0. lint reports two existing unused-variable warnings.01a1040d-2cf6-7ad0-ad78-caf497cc7511with01a1040f-3c59-7170-8190-8dd3580ce1d7. with only the adapter patch applied, repeating the archive/restart/followup kept01a1040f-3c59-7170-8190-8dd3580ce1d7and completed the turn without a new resume-failed warning.the terminal in these captures runs a read-only query of the sandbox's actual persisted
run-attempt.updatedevents. before: completed runs 1 and 2 have different native ids. after: runs 2 and 3 have the same native id. both versions recalled the token through conversation history, so token recall alone does not prove native-session continuity.after: real client followup completes with the original native session and read-only event proof.
after.mp4
desktop, mobile, remote/relay, tunnel, and live chatgpt archive were not independently exercised. the shared server adapter serves those clients; the real provider archive was exercised through codex's native rpc. no client ui or wire contracts change.
implemented by
gpt-6.1-solwith xhigh reasoning through the codex harness in t3 code.