Repository navigation
Description
Environment
- Codex Desktop 26.1013.40934, build 20770.
- OS build: Windows NT 10.0.26300.0 (x64).
- Windows package: OpenAI.Codex 26.1013.4894.0, x64.
- Incident observed in the unmodified official application on 2026-10-20, 07:24 UTC+08:00 (2026-10-19, 23:24 UTC).
Observed behavior in the official application
Two bundled-plugin sync completions were followed by Local Work executor planned restarts approximately five seconds apart. Startup attempt 3 failed while replacing executor-plugins/codex-app-tools/server.mjs, with EBUSY from unlink. The executor retried and connected on attempt 4. Plugin-list requests also timed out during this startup episode, making the application appear to be continually loading tools or disconnected.
Selected log fields below retain UTC timestamps; paths and unrelated identifiers are omitted:
2026-10-19T23:24:36.988Z [tpp-local-executor] event=lifecycle_stop reason=planned_restart
2026-10-19T23:24:42.171Z [tpp-local-executor] event=lifecycle_stop reason=planned_restart
2026-10-19T23:24:42.889Z [tpp-local-executor] Local Work executor startup failed attempt=3 errorCode=EBUSY
EBUSY: resource busy or locked, unlink '<executor-plugin-root>/server.mjs'
2026-10-19T23:24:42.891Z [tpp-local-executor] Scheduling Local Work executor restart attempt=3 delayMs=1000 reason=startup_failure
2026-10-19T23:24:57.440Z [tpp-local-executor] Local Work executor connected to rendezvous attempt=4
2026-10-19T23:25:07.177Z [electron-message-handler] mcp_request_timeout method=plugin/installed
The file-copy stack includes Node's mayCopyFile, copyDir, and the application's executor plugin preparation path (readCapabilityRoots). This concerns the built-in codex-app-tools runtime copy.
Expected: an unchanged bundled plugin should be reused without rewriting files in use or disrupting executor startup.
Deterministic Windows reproduction
We reproduced the file-operation failure in an isolated local harness using the original plugin synchronization function and the installed bundled plugin files:
- Perform the initial synchronization into an empty temporary destination.
- Open the destination
server.mjswith a real Windows file handle:FileMode.Open,FileAccess.Read,FileShare.Read. Keep the handle open. This permits reading but denies replacement/deletion. - Invoke synchronization again without changing the source. The original recursive copy fails with
EBUSY, syscallunlink. - Under the same held lock, invoke a candidate synchronization implementation that skips byte-identical files. It succeeds without copying files or writing configuration;
server.mjsmodification time remains unchanged.
This reproduces the Windows lock condition, not the identity of the process holding the file in the original incident. The actual incident's lock owner remains unknown.
Local candidate and verification
The candidate serializes synchronization per destination directory, compares file contents before copying, and writes the generated .mcp.json only when the effective configuration changes. The bundled source .mcp.json is excluded from copying because the destination configuration is generated afterward.
All eight isolated regression checks passed:
| Check | Result |
|---|---|
| Fresh destination | Same file contents and effective configuration as the original function |
| Real Windows read-sharing lock | Original: EBUSY; candidate: success, zero copies/writes |
| Changed source bytes | Changed server.mjs copied; identical files untouched |
| Changed effective configuration | Configuration updated without recopying the server |
| 12 concurrent refresh calls | Maximum concurrent copies: 1; server copied once; configuration written once |
| Failure followed by queued/later calls | Later calls recover; queue is not poisoned |
| Unavailable bundled plugin | Preserves null result without writes |
| Unexpected destination access error | Error remains visible rather than silently ignored |
These are local candidate results, not a claim that OpenAI has confirmed or shipped a fix. The candidate does not remove every planned restart, and genuinely changed files can still fail to update while locked.
Suggested upstream fix
Skip identical runtime files and unchanged generated configuration, and serialize updates targeting the same executor plugin directory. Also review overlapping refresh/startup scheduling and the shutdown/update ordering when file content really changes.
Earlier retained logs already contain planned restarts, so this is not established as a regression introduced by this particular version. The timing suggests overlapping refreshes contribute to the failure, but that causal link needs upstream verification. This report is limited to the local executor startup/file-lock failure; it does not attribute separate model-stream network errors to this issue.
No account data, conversation content, user-specific filesystem paths, binaries, or full extracted application source are included.
Activity
github-actions commentedon Oct 20, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
fbernklau commentedon Oct 20, 2026
Additional Windows Desktop + WSL reproduction on 2026-10-20, with a cancellation/serialization mechanism relevant to this issue.
Same Windows package 26.1013.4894.0, build 20770. The live error here is
ENOENT unlinkon the staged.codex-plugin/plugin.json; earlier retained logs also showEBUSYonserver.mjs. There is only one main Desktop process, and the plugin source/target are ordinary Windows directories.The important new finding is that cancelling a queued registration can release the queue while its underlying
readCapabilityRoots()operation continues. A subsequent registration can therefore overlap writes to the same plugin destination. The isolated test below reproduces the queue overlap in 10/10 runs and eliminates it in 10/10 runs when the queue drains the underlying operation. This is a demonstrated mechanism, not proof that concurrent copies have been traced inside the live app.Related WSL discovery/performance issue: #26149. This is an existing profile after earlier troubleshooting, not a clean-install reproduction. No packaged app code was modified.
Sanitized diagnostic report, timings and suggested product corrections
Self-contained queue/abort reproduction (Node; no app files, network or configuration touched)
Save as
reproduce_executor_abort_overlap.mjsand runnode reproduce_executor_abort_overlap.mjs.Observed:
currentQueueis ten values of2;queueDrainsUnderlyingOperationis ten values of1.Could maintainers confirm whether the cancellation/serialization and unchanged-file replacement paths have a fix, and identify the first Windows Desktop build containing it? A durable supported Windows Desktop + WSL solution is needed; moving/copying the whole Codex home, filesystem redirection, or disabling the installed plugin set is not an acceptable long-term remedy for this user.
Submitted with the user's authorization using Codex assistance. No raw logs, account data, project names or session transcripts are included.
johnmart19 commentedon Oct 21, 2026
Additional reproduction on production 26.1016: concurrent copies also produce ENOENT / EPERM
Independent confirmation of a related executor-plugin copy failure on a newer Windows production build.
Environment
26.1016.51333, build21161, production channel;up_to_datewhen checked.26.1016.6573.0.Application observations (sanitized)
During one launch, the first Local Work executor attempt connected successfully. A subsequent attempt failed with
EPERMwhile unlinking<userData>/executor-plugins/codex-app-tools/.codex-plugin/plugin.json; the next automatic retry connected. A previous launch also recordedENOENTwhile unlinking the same destination.Read-only inspection showed unconditional recursive copying to the shared executor-plugin destination during
readCapabilityRootspreparation, followed by generated.mcp.jsonwriting. The destination manifest was not ReadOnly and the user had FullControl. This is consistent with an overlapping-copy failure; the precise overlapping application callers have not been instrumented. It is not proof that this explains every unsuccessful UI launch or renderer fault.Isolated reproduction
Run the following as
node reproduce-copy-race.mjsin a scratch directory. It uses only synthetic files and leaves its test subtree intact. In a run with the installed bundled Node runtime:This demonstrates the matching filesystem failure mechanism, not the full production scheduling.
reproduce-copy-race.mjs
Candidate fix and regression checks
Serialize preparation by normalized destination across controller/window lifetimes, and include both copying and generated configuration writing in that critical section. Keep the lock until the actual filesystem operation settles even if an awaiting caller is cancelled. Avoid replacing byte-identical files, as already discussed in this issue.
The small helper below addresses same-process overlapping copies. It is an illustrative integration component, not a complete app patch. Production integration must also consider junction aliases, parent/child destinations, interprocess writers and crash-safe publication of changed plugin versions. It will not solve a genuinely changed file held by a non-delete-sharing Windows handle on its own.
serialized-copy.mjs
Verified locally: twenty serialized copy operations completed without error; manifest and all twenty file contents matched. A failed queued operation did not poison the next one, and different destinations remained concurrent.
test-serialized-copy.mjs (run with node)
No claim that this fix is shipped or applied to the installed application. Local Work remains enabled.
Privacy
This comment contains only sanitized observations and independently authored synthetic test/candidate code. No usernames, machine names, personal paths, account IDs, task/conversation IDs, conversation contents, credentials, screenshots, raw logs, binaries or extracted proprietary application source are included.
Report marker:
executor-copy-concurrency-26.1016-enoent-eperm.