Repository navigation
fix(codex): start safely with Windows CUA disabled - #50
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b80457ed9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
The failed The four focused configuration/parser cases passed with the actual Codex binary after the port, along with scoped type-aware/type-check lint, formatting and diff checks. The previously recorded Windows parser/resume and .61 restoration evidence remains unchanged. Normal exact-head CI will verify this follow-up; production build/publication and the remaining device rollout are still held. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6db5b2d71f
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ((cuaGenerations.get(turnInput.threadId) ?? null) !== generation) { | ||
| // Resume reuses a loaded thread's MCP connections. Unload it first | ||
| // so a revoked attachment cannot survive the configuration change. | ||
| yield* client.request("thread/unsubscribe", { threadId }); |
There was a problem hiding this comment.
Wait for actual unload before resuming CUA
When a loaded thread’s CUA generation changes under the normal nonzero unload delay, thread/unsubscribe removes only this connection’s subscription; it does not unload the thread, and the immediately following thread/resume re-subscribes and cancels the pending unload. Codex’s own unsubscribe test verifies that the thread remains loaded and can be resumed immediately. Since a loaded-thread resume retains its existing MCP connections, the replacement config is never applied and a revoked CUA attachment remains agent-accessible; wait for thread/closed/notLoaded or otherwise force immediate unload before resuming.
AGENTS.md reference: AGENTS.md:L74-L74
Useful? React with 👍 / 👎.
| // Resume reuses a loaded thread's MCP connections. Unload it first | ||
| // so a revoked attachment cannot survive the configuration change. | ||
| yield* client.request("thread/unsubscribe", { threadId }); | ||
| observatoryRegisteredThreads.delete(threadId); |
There was a problem hiding this comment.
Preserve observatory qualification across the CUA rebind
When an observatory-enabled thread changes CUA generation, deleting this entry disables observatory for every subsequent turn even though the native tool remains available: Codex persists dynamic tools in thread history and restores them on resume. buildCodexTurnStartParams then omits the observatory instructions and routeObservatoryInvocation rejects every native call because the set no longer contains the thread, while the entry is never re-added except during a new thread/start; preserve the known same-session registration or explicitly re-establish it.
Useful? React with 👍 / 👎.
Codex failed before starting an ordinary agent turn when Windows CUA was off: the managed MCP entry contained
enabled: falsewithout a transport. Supply a valid disabled stdio descriptor and replace previous routing. When the CUA generation changes, unsubscribe the loaded native thread before resuming it, because resume alone retains its MCP connections. Other provider, driver, application, lockfile and Android paths are unchanged.Validation: focused configuration, disabled-control and adapter checks; actual Codex 0.162 on Linux and installed 0.163.0-alpha.10.2 on Windows reproduced the old failure and accepted disabled start/resume. A harmless isolated stdio fixture changed from connected to disabled after unsubscribe/resume; its explicitly marked saved-history fixture did not request a model turn. Scoped type-aware/type-check lint passed with existing warnings, plus formatting and diff checks. The failed .62 rollout was stopped and the Windows canary restored to .61 with one completed shell-action agent check.
This PR is source-only. No production build, packaging, publication or further fleet installation is authorized by it.
Model: GPT-6.1-Sol, high reasoning/default tier. Harness: Codex in T3 Code.
Need help on this PR? Tag
@codesmith-botwith what you need.