Scheduled Codex Desktop runs hang on `list_threads` while interactive calls succeed
Environment
- Codex Desktop
26.715.72359(build5718) codex-cli 0.145.0-alpha.30- macOS on Apple Silicon
- Two connected macOS hosts using Codex Desktop Remote Control
Hostnames and all task identifiers are omitted for privacy.
Issue
Official Codex Desktop thread-management tools work interactively, including across connected hosts, but list_threads consistently fails to return from naturally scheduled automation runs.
Interactive tests succeeded in both directions:
list_threadsreturned local and remote tasks.read_threadreturned recent turns from both hosts.set_thread_titlerenamed a task on the other host, and readback verified the change.
The same list_threads operation did not complete during scheduled runs, even though the tool was exposed with a valid schema.
Reproduction
- Connect two macOS Codex Desktop hosts through Remote Control and keep both online.
- In a fresh interactive task, verify that
list_threads,read_thread, andset_thread_titleare exposed. - Interactively list tasks, read a task from each host, rename one on the other host, and verify the change. These operations succeed.
- Create a standalone scheduled automation whose first operation is a read-only
list_threadscall. - Allow the automation to run naturally.
- Observe that
list_threadsremains pending or fails to return. - Repeat with result limits of 50, 20, 10, and 5. All attempts fail before any task can be inspected or renamed.
- Run the equivalent scheduled automation against the connected remote host. Three natural scheduled runs fail in the same way.
- As a bounded control, make one scheduled
send_message_to_threadcall to a fixed idle control task. That call also fails to complete, while the corresponding interactive workflow works.
Expected behavior
A naturally scheduled task given the official list_threads tool should be able to call it as an interactive task can.
If thread operations are intentionally unavailable in scheduled runs, the tools should not be exposed there, or they should immediately return a structured and actionable error. They should not remain pending indefinitely.
Actual behavior
- Interactive local and cross-host thread operations succeed.
- Naturally scheduled
list_threadscalls consistently fail on both tested hosts. - Reducing the requested result count does not help.
- The scheduler starts each run and delivers the prompt; failure begins at the Codex Desktop app-tool call.
The automations were paused after the bounded reproduction attempts.
Related issues
- #33503 — mentions a
list_threadshang in a full-suite scheduled run. - #31584 — a macOS scheduled automation stalled on
codex_app.list_projects. - #28080 — Desktop thread tools intermittently lose their handlers.
- #21995 — scheduled app-connector calls fail while later manual execution succeeds.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Post-update reproduction
Retested after updating both connected macOS hosts:
26.721.30844(build5813)codex-cli 0.146.0-alpha.3Interactive control still passes:
list_threads(limit: 15)returned immediately across both connected hosts, with no unavailable hosts.One bounded naturally scheduled canary was then run on the updated build. It launched normally, received its prompt, and called
list_threads(limit: 10)exactly once. That call never returned. The scheduled run ended after approximately 194 seconds.Because the first call did not return:
read_threadwas not issuedset_thread_titlewas not issuedThe automation’s original prompt and recurrence were restored exactly, and it was left
PAUSED.A second post-update controller on the other host still did not expose
automation_update, so no additional scheduled canary was armed there and no persistence files were edited manually.Separate compatibility observation: the controller-side tool schema advertised a
queryargument forlist_threads, but the updated Desktop handler rejected it withUnrecognized key: "query". Calls using onlylimitcontinued to work interactively.Result: the scheduled-run
list_threadsfailure remains reproducible on26.721.30844/0.146.0-alpha.3.Additional observation from a scheduled automation run on 2026-07-29 (macOS):
list_threads(limit=25)call.undefined).This is a bounded failure rather than an indefinite pending call, but it has the same operational impact: a scheduled task cannot safely inspect or manage threads. A structured timeout/error result would let automations report the failure reliably without guessing state.
Newer-build reproduction
Reproduced again on macOS Apple Silicon with:
26.803.41515(build6321)codex-cli 0.147.0-alpha.6.5A natural scheduler-origin task launched normally and successfully completed a preceding fixed read-only helper call. It then made exactly one standalone
codex_app list_threads({limit: 50})call. That call remained pending for about 4m46s until the task terminated it.No retry, alternate inventory path, thread read, task creation/continuation, or external action occurred. The affected automation was immediately paused.
An interactive
list_threadscall approximately 15 seconds earlier returned successfully. Its underlying local app-serverthread/listresponse completed in about 3 ms and included the active automation task.Additional implementation evidence from the packaged Desktop build:
useStateDbOnly: true, so JSONL scan/repair is not the cause in this reproduction;codex_app list_threadsschema exposes onlylimit;Expected: a naturally scheduled task can use the exposed official tool, or receives a structured actionable error.
Actual: the tool remains pending, preventing collision-safe unattended automation.
Private task identifiers and local paths are omitted here and can be supplied through a private support channel if useful.
Windows reproduction:
automation_updateandsend_message_to_threadhang in the same natural scheduled runI reproduced the same scheduled-run tool-routing failure family on Windows, with an additional high-impact failure mode: a heartbeat cannot reliably advance its own next checkpoint because both the schedule update and all recovery notifications can hang together.
Environment
26.803.10989.010.0.26200, x64Observed sequence
A time-sensitive heartbeat fired normally and received its prompt. Its contract required it to update the same heartbeat to the next checkpoint before dispatching several independent messages.
codex_app automation_updatecall, changing only the recurrence for the next checkpoint.automation_update(mode: "view")verification call also failed to return within 20 seconds.send_message_to_threadattempt to each of five fixed existing threads. All five calls failed to return within 20 seconds.automation_update(mode: "view")call also timed out.All message deliveries and the schedule mutation therefore had to be classified as ambiguous. No automatic retry was made.
This occurred after an earlier natural scheduled run showed the same update symptom. A separate controller later verified that the earlier timed-out update had not changed the persisted recurrence and had to repair it with one full-field update. Without that external repair, the heartbeat would have remained on its old weekly time and the next intra-day checkpoint would have been skipped; its next natural run would have been one week later.
A later run again reached the scheduled prompt successfully but then lost the app-tool response path for both
automation_updateandsend_message_to_thread.Expected behavior
automation_updateshould return a definitive mutation result and an idempotency token/status that can be queried safely.Actual behavior and impact
This creates one shared failure domain across scheduling, delivery, verification, and incident reporting. It is especially unsafe for time-sensitive unattended workflows because the correct no-duplicate behavior (do not retry an ambiguous mutation or send) also means there is no in-band recovery path.
Suggested engineering investigation
automation_update,automation_update(view), andsend_message_to_thread.No raw logs or private Codex state are attached. Narrow sanitized identifiers and timestamps can be supplied privately through an OpenAI-controlled support channel if maintainers need correlation data.
Follow-up Windows reproduction: intermittent failure after a healthy run in the same task
Reproduced again on 2026-08-14 in a naturally fired Windows Desktop heartbeat. This follow-up adds an important control: the immediately preceding checkpoint in the same automation task completed its full-field recurrence update, card readback, and three fixed-thread sends successfully. The next natural checkpoint then lost the response path for all of those app tools together.
Sanitized sequence:
automation_update, changing only the recurrence to the next checkpoint. The wrapper received no result within its 20-second bound.automation_update(mode: "view")readback. That also received no result within 20 seconds.send_message_to_threadattempt to each of three fixed existing threads. All three received no result within 20 seconds.The preceding natural checkpoint, roughly two hours earlier in the same task and session, returned promptly for the equivalent update/view/send sequence. This suggests the scheduled-run route can degrade intermittently without a task, prompt, target, or topology change, rather than being a permanently unsupported operation.
Operational impact remains the same: the task cannot determine whether its next recurrence persisted, cannot safely retry, and cannot know whether any recipient received the dispatch.
No private task IDs, automation IDs, account details, project paths, or workflow content are included.
I can confirm the same failure on Windows.
Environment
Codex Desktop 26.810.52044Embedded codex-cli 0.148.0-alpha.9Windows 11 Pro (OS build 26200.9168)Scheduled automation running locally in Codex DesktopAn hourly local automation stalled on
codex_app__list_threads({limit: 20})in six consecutive naturally scheduled runs. A separate bounded diagnostic then made 12 scheduled single-call probes, cycling limits 1, 5, and 20; all timed out. The scheduler delivered each prompt, but execution stopped at the app-tool call.Our temporary local-only workaround is:
%USERPROFILE%\.codex\thread-writer-locks.CODEX_THREAD_IDto identify the current run.read_thread(hostId: "local", turnLimit: 1, includeOutputs: false)for each held task ID.No Codex thread found; count only other tasks whosestatus.typeisactive.That gate completed in about 3.3 seconds in our test. It relies on an undocumented implementation detail and only covers local Codex tasks, not remote/ChatGPT tasks, so it is a workaround rather than a general fix.
Fresh reproduction on 2026-08-18 with Codex CLI 0.147.0:
codex_app__list_threads({ limit: 200 }).Expected:
list_threadsshould return the Codex task catalog or a bounded, actionable error during scheduled runs.Diagnostics were uploaded through
/feedback. Uploaded thread ID:01a014a5-4343-7f23-b239-bb052fb6ab91.