Windows Codex Desktop creates automation thread but never starts agent turn
On Windows Codex Desktop, scheduled automations can create and name the automation thread, but never start the agent turn. The same account works reliably on macOS.
This still happens in a trusted local project even with:
sandbox_mode = "danger-full-access"
approval_policy = "never"
[windows]
sandbox = "elevated"
Environment observed locally:
- OS: Windows
- Codex Desktop:
26.17.415 - CLI/session version:
0.122.0-alpha.13 - Workspace:
C:\CodexAutomationSmoke - Execution environment: local
- Automation id:
testcodex
Smoke prompt was text-only:
Reply exactly:
STATUS: TEXT_ONLY_AUTOMATION_OK
Do not run commands. Do not inspect files. Do not use tools.
Failing run signature:
- Local DB rows are created in
C:\Users\Scott\.codex\sqlite\codex-dev.db. - Rollout files are created under
C:\Users\Scott\.codex\sessions\2026\04\21\. - Failed rollouts contain only
session_metaandthread_name_updated. - They do not contain
task_started,turn_context,response_item, submitteduser_input, tool calls, or an inbox item. - Local logs show only
SetThreadName, followed byactive_turn_present=false active_turn_id=None active_turn_status=None.
Affected thread/run ids:
019db1fb-10ac-77c2-8bd3-06158e1714f5
019db1fc-445f-7653-9a43-38cf9a7d782a
019db1fe-6e3c-7923-a7da-81ce1eb79ce1
019db208-b5eb-77e1-b280-cc8b9eeccc85
Successful contrast: later testcodex runs did receive real turns, including 019db212-4ed1-7c42-83d4-2164408c5b18, which had session_meta, event_msg, response_item, and turn_context entries. That suggests the workspace, account, and prompt can run once the prompt is actually dispatched.
Expected: automation run submits the prompt into the new thread as a runnable agent turn.
Actual: Windows Desktop sometimes creates and names the thread but leaves the rollout as a skeleton with no runnable turn.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I reviewed the duplicate suggestions from the bot.
Related, but this does not look like an exact duplicate of the suggested issues:
next_run_atadvances butlast_run_atstays null and noautomation_runsrow is created. In this Windows repro,automation_runsrows and rollout files are created, but the rollout stops atsession_meta+thread_name_updatedwith no submitteduser_input/task_started/turn_context.turn/startedis received for an unknown conversation and the UI shows reconnecting. This may be adjacent, but the automation repro here does not get as far as aturn/started; local logs show onlySetThreadNamefollowed byactive_turn_present=false active_turn_id=None active_turn_status=None.So I am leaving this issue open as a more specific Windows automation dispatch failure: the thread is created/named and persisted, but the automation prompt is not submitted as a runnable turn.
I found a practical workaround on Windows that may help narrow the failing code path.
What works reliably for me:
heartbeatattached to an already-existing manual thread.What fails for me:
cronautomation path that creates a new thread for the run.Concrete example:
daily-bug-scanas a standalonecronautomation created a new run/thread (019dbc00-aac0-71b3-87a4-a7f9a7be3f37), but the rollout only containedsession_meta+thread_name_updated.task_started,turn_context,response_item, or submitted prompt.thread/read,thread/resume, thenlatestTurnId=null,latestTurnStatus=null,turnCount=0.By contrast:
heartbeatautomation attached to an existing thread did post successfully into that thread.Daily bug scanto run in an existing thread instead of creating its own automation thread.So the current workaround/fix on my side is:
cronjobs into threadheartbeatautomations attached to an existing conversation.This does not look like a true product fix; it looks like the existing-thread resume/post path is healthier than the new-thread first-turn dispatch path on Windows.
There may also be a separate timing bug in my environment: on 2026-04-23 both a 9:00 AM cron automation and a 9:00 PM heartbeat fired around 3:21 PM CDT instead of their configured local times. But independently of that timing issue, the important difference is:
I can reproduce the same issue on Windows ARM64.
Environment:
0.125.00.126.0-alpha.8localcodex execcan write files locallyAutomation configuration:
automation.tomlexists and isACTIVEkind = "cron"execution_environment = "local"cwdspoints to the correct local project folderObserved behavior:
.jsonlcontains only metadata, includingsession_metaandthread_name_updated.State DB evidence from the failed run:
tokens_used = 0first_user_message = ""model = nullreasoning_effort = nullsandbox_policy = {"type":"read-only"}cwdis correctsource = "vscode"This matches the issue described here: the automation run/session is created visually, but the saved automation prompt is never injected/submitted as an agent turn.
This does not appear to be a workspace permission or local filesystem issue, because the same project can be written to successfully from:
codex execUpdate: the workaround I posted above is now causing a second failure mode.
I previously said that moving affected automations from standalone
cronjobs into existing-threadheartbeatautomations was a practical Windows workaround. That was only partially true. It avoids the original new-thread first-turn dispatch failure, but it is not stable when applied broadly.After retargeting my real automations this way, I now have several
ACTIVEautomations with:kind = "heartbeat"target_thread_idcwds,executionEnvironment, ordestinationin the local TOMLThe new failures I am seeing are:
Could not start automation — Timed out waiting for MCP response to thread/resumeFailed to resume chat — cannot resume running thread with mismatched pathSo the failure appears to have two related paths:
target_thread_id, Desktop can get stuck trying to resume that old thread. If the target thread is already running, stale, archived, or associated with a different path/workspace context, the automation can fail before it starts with a thread/resume timeout or a mismatched-path resume error.That means the heartbeat retarget workaround should not be treated as a product fix. In my environment it reduced one failure mode but introduced another one tied to persisted thread identity and resume state.
The safer mitigation on my side is now:
target_thread_idvaluesExpected product behavior would be that a scheduled automation can run without needing to resume a prior chat thread, and that an invalid/running/mismatched
target_thread_idfails cleanly instead of causing a resume loop or blocking the automation start.the part that breaks down is the assumption that 'create thread' and 'start turn' are the same operation across platforms. on macOS the parent context rides through both. on Windows the elevated sandbox path takes the thread creation but the IPC handoff to start the agent turn is a separate journey, and the rollout signature in this report (session_meta + thread_name_updated, no task_started or turn_context) is exactly what the second leg failing silently looks like. a hard timeout between SetThreadName and the first turn_context event would surface this as a startup failure rather than a skeleton rollout.
I’m seeing what looks like the same failure mode on Windows Codex Desktop.
Observed behavior:
Local evidence from Codex inspection:
rollout-2026-05-18T13-59-12-019e3a4f-8ceb-7361-b2db-e30268969c4b.jsonl
Run id:
Expected project outputs were missing:
Control test:
This strongly suggests the automation launcher creates the run shell but fails before dispatching the saved prompt into an executable agent turn.
I also submitted in-app /feedback for this and can provide the feedback/session ID if helpful:
[019e30fd-2702-73b3-b6be-a71bf4be7f3e]
Another reproduction on a newer Windows Codex build. This looks like the same broad Windows automation dispatch failure, with one additional data point: in my repro, both standalone scheduled automation and thread heartbeat automation failed to dispatch.
Environment
OpenAI.Codex_26.623.13972.0_x64__2p2nqsd0c76g0codex-cli 0.142.5codex doctor:Windows 10.0.26200 (Windows 11 Professional) [64-bit]codex doctorapproval_policy = neverRepro
Actual behavior
ACTIVE.This differs slightly from earlier reports where heartbeat sometimes worked as a workaround. On this build/environment, the heartbeat path also did not fire.
Control tests
Direct CLI execution works:
A Windows Task Scheduler task that launches the bundled Codex CLI also works and successfully starts a Codex run. So this does not appear to be an auth, filesystem, model, or general CLI execution problem.
Diagnostics
codex doctorreports the background server as not running:Trying to start the daemon path on Windows fails:
Both return:
Suspected failing layer
The automation definitions can be persisted, but the scheduled dispatch layer does not wake and start a real turn. Since direct
codex execworks and Windows Task Scheduler launching the bundled CLI works, the failure seems specific to the Windows Desktop automation runner / dispatch layer rather than the agent runtime itself.The app-server daemon result may or may not be the direct cause, but it is a useful clue: the local background lifecycle path that would normally make unattended wakeups robust reports as unavailable on Windows, while the UI/tooling still exposes automations as if they should run.