GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): preserve Codex command wakeups across restarts by MaximilianMauroner · Pull Request #23585 · pingdotgg/t3code

Conversation

@MaximilianMauroner

@MaximilianMauroner MaximilianMauroner commented Oct 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🤖 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.

All reactions
MaximilianMauroner added 2 commits October 22, 2026 11:09
@MaximilianMauroner
test(server): expose restart loss of command completion ownership
4fad287
@MaximilianMauroner
fix(server): recover owned command completions after restart
5de2093
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 22, 2026
@MaximilianMauroner
test(server): use typed command wake ownership checks
b9a84f6
@MaximilianMauroner
MaximilianMauroner marked this pull request as ready for review October 22, 2026 13:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 8d3b061
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f7f2fe53-ab7e-40f8-8e49-010546200000
📥 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: Passed 4
Check name Status Explanation
Title check Passed The title is concise, conventional, and accurately identifies the main change: preserving Codex command wakeups across server restarts.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed 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)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MaximilianMauroner added 2 commits October 22, 2026 15:55
@MaximilianMauroner
Merge branch 'main' into fix/restart-awaited-command-continuation-202…
0cb3336
…61022
@MaximilianMauroner
Merge branch 'main' into fix/restart-awaited-command-continuation-202…
1535b0d
…61022
@MaximilianMauroner MaximilianMauroner mentioned this pull request Oct 24, 2026
[Bug]: Codex command cancellation on server restart leaves its caller asleep #24503
Closed
2 tasks done
@juliusmarminge juliusmarminge mentioned this pull request Oct 24, 2026
fix(server): wake Codex callers when restart cancels commands #24538
Merged
@MaximilianMauroner MaximilianMauroner closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Codex command cancellation on server restart leaves its caller asleep

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@MaximilianMauroner
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.