GeezerVison is showing github.com — fix(server): preserve Codex command wakeups across restarts by MaximilianMauroner · Pull Request #23585 · pingdotgg/t3code
Conversation
🤖 Comment made by gpt-6.1-sol acting on behalf of @MaximilianMauroner.
Problem
A T3 restart can cancel a Codex command after its agent turn ends and leave the caller asleep. The adapter promises a late completion notification, but restart recovery loses that ownership.
Change
Persist the existing notification ownership on root command items and cancellation notes. Keep it through updates and duplicate-note merges. Reuse the existing restart continuation outbox and eligibility gates.
Scope and approval
This is a focused repair of an existing notification promise under CONTRIBUTING.md's obvious-bug exception. It adds no queue, caller API, configuration, or command classifier. Root native Codex commands with continuation support qualify. A marked server command can also report restart cancellation. Old unmarked records retain their behavior. Generic completion-delivery retries remain outside scope. Maintainer acceptance is pending.
Verification
- A separate test-only commit reproduced three missing-wake failures before the fix. Five paired unowned cases passed.
- On Coding VM,
vp run check:changed upstream/main through heavy-check passed format, lint, knip, generated code, 29 affected package typechecks, and 146 tests across four files after the final cleanup.
- Sol and DeepSeek reviewed the full change. DeepSeek's test-compile finding is fixed. Fresh Sol reviews found no production or Effect-convention issue and approved the typed-access cleanup.
- The captured isolated Effect service runtime below passed its two owned/unowned cases. It uses the real recovery service, projection reducer, and continuation logic. Projection storage and final dispatch are stubs. It does not prove SQLite persistence or a subprocess restart.
EVIDENCE {"kind":"isolated-effect-service-runtime","phase":"before-recovery","work":{"kind":"shell","label":"pnpm test","id":"turn-item:dev-server","completionWake":"always"},"status":"running"}
EVIDENCE {"phase":"after-recovery","status":"cancelled","cancelledWork":[{"kind":"shell","label":"pnpm test","id":"turn-item:dev-server","completionWake":"always"}],"continuationEffects":[{"type":"provider-runtime.continue","sourceRunId":"run:restart"}]}
EVIDENCE {"phase":"after-repeated-recovery","commits":1,"shutdownWrites":0}
EVIDENCE {"phase":"continuation-dispatch-at-fake-io-boundary","messages":[{"messageId":"message:restart-continuation:run:restart","text":"Note: the T3 server restarted, and this background work was cancelled before it finished. It will not report back on its own, so resume or restart what you still need and wait for its result:\n- shell: pnpm test"}]}
EVIDENCE {"phase":"duplicate-continuation-with-existing-message","messages":[]}
EVIDENCE {"phase":"after-recovery","status":"cancelled","cancelledWork":[{"kind":"shell","label":"pnpm test","id":"turn-item:dev-server"}],"continuationEffects":[]}
EVIDENCE {"phase":"continuation-dispatch-at-fake-io-boundary","messages":[]}
Full hosted CI is not verified. No installed service restart, deployment, or merge ran. Opus and Sonnet attempts hit Claude rate limits. GLM could not run due provider balance. None supplied a review pass.
Implementation by GPT-6.1-Sol in the Codex harness through T3 Code. Completed source reviews by GPT-6.1-Sol and DeepSeek V4.1 Flash. Guideline and final cleanup reviews by GPT-6.1-Sol.
Linked issue
Fixes #24503.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
⚠️ Failed 2026-10-22T13:32:30.280738Z We couldn’t complete this review. Comment @codex review to try again. |
b9a84f6 |
Draft marked ready |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
ℹ️ Recent review info
-
⚙️ Run configuration
-
📥 Commits
-
Reviewing files that changed from the base of the PR and between 8d3b061 and b9a84f6.
📒 Files selected for processing: 7
-
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts
apps/server/src/orchestration-v2/RestartBackgroundNote.test.ts
apps/server/src/orchestration-v2/RestartBackgroundNote.ts
apps/server/src/orchestration-v2/RestartContinuation.test.ts
packages/contracts/src/orchestrationV2.test.ts
packages/contracts/src/orchestrationV2.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Walkthrough
-
The change adds optional completion ownership to command turn items and restart-cancelled work. Root command completion can retain that ownership through cancellation notes, and restart recovery uses it when evaluating continuation eligibility.
Changes: Command completion wake recovery
| Layer / File(s) |
Summary |
Command ownership contracts and projection packages/contracts/src/orchestrationV2.ts, packages/contracts/src/orchestrationV2.test.ts, apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts, apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts |
The contracts add optional completionWake: "always" to command turn items and restart-cancelled work. Root command projections set the field when continuation requests are available. Tests cover projection with and without continuation support, thread unload, and interrupted child commands. |
Cancellation note ownership apps/server/src/orchestration-v2/RestartBackgroundNote.ts, apps/server/src/orchestration-v2/RestartBackgroundNote.test.ts |
Shell work retains completionWake. Awaited-work checks treat shell work as awaited only when the field is "always". Duplicate work upgrades an existing entry when the duplicate has that value. |
Restart continuation eligibility apps/server/src/orchestration-v2/RestartContinuation.test.ts |
Recovery tests cover owned and unowned work, reconciliation after commits, continuation dispatch, and conditions that allow or block continuation. |
Priority: Normal
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Possibly related issues
pingdotgg/t3code#21865 — The change updates root native Codex command ownership and restart recovery, which affects the restart handling path described in this issue.
pingdotgg/t3code#23399 — The issue concerns preserving completion wake for a child thread_send; the changes described here cover root commands, not that child case.
Suggested reviewers: t3dotgg, juliusmarminge
Merge Risk: Minimal · up to b9a84
-
No actionable merge-blocking issue remains. A full service restart has not been exercised, but the inspected persistence path retains command wake ownership.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title is concise, conventional, and accurately identifies the main change: preserving Codex command wakeups across server restarts. |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Description check |
 |
The pull request description covers the problem, change, scope, verification, limitations, linked issue, and agent attribution. It explains the obvious-bug exception for the missing maintainer approva… |
Full details: Description check
-
Explanation
The pull request description covers the problem, change, scope, verification, limitations, linked issue, and agent attribution. It explains the obvious-bug exception for the missing maintainer approval and reports detailed test results. The description is complete enough for review.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|