Codex Desktop scheduled automations create empty sessions with no prompt or task turn
Codex Desktop Scheduled Automations Create Empty Sessions
Title
Codex Desktop scheduled automations create empty sessions with no prompt or task turn
Environment
- Product: Codex Desktop
- Operating system: Windows
- Shell: PowerShell
- Timezone: Australia/Brisbane
- Codex CLI versions observed in failed scheduled run files:
0.125.0-alpha.30.126.0-alpha.8- Relevant config:
model = "gpt-5.5"[windows] sandbox = "elevated"
Issue
Scheduled cron automations appear to fire enough to create a session/thread, but the saved automation prompt is not injected into the run.
The resulting session contains only startup metadata such as session_meta and thread_name_updated. There is no user prompt, no assistant response, no tool call activity, no token usage event, and no task completion.
Expected Behavior
At the scheduled time, Codex Desktop should:
- Create the scheduled automation run.
- Inject the saved automation prompt into the session.
- Execute the task.
- Report the result in the created thread/session.
Actual Behavior
At the scheduled time, Codex Desktop creates a run/session, but no actual automation task starts.
Observed in the smoke-test run:
- Session file was created shortly after the scheduled time.
- Working directory was set correctly.
thread_name_updatedevent existed.- User messages:
0 - Assistant messages:
0 - Tool calls:
0 - Token events:
0 - Task completions:
0
Minimal Reproduction
- Create a temporary cron automation in Codex Desktop.
- Schedule it a few minutes into the future.
- Use a harmless prompt:
Scheduler smoke test only. Do not inspect, create, edit, rename, or delete any files. Simply reply with exactly: TEMP SCHEDULER SMOKE TEST RAN OK at <current local time>.
- Use a local test workspace.
- Wait for the scheduled time.
- Inspect the created
.jsonlsession file.
Redacted Evidence Summary
Smoke-test automation:
- Temporary automation name:
[REDACTED_TEMP_AUTOMATION_NAME] - Scheduled local time:
2026-04-28 19:35 Australia/Brisbane - Session created local time: approximately
2026-04-28 19:36:59 Australia/Brisbane - Session ID:
[REDACTED_SESSION_ID] - Workspace path:
[REDACTED_LOCAL_PATH] - Prompt content: harmless smoke-test prompt shown above
- Result: empty session with
session_metaandthread_name_updatedonly
Earlier scheduled automations showed the same pattern:
- Scheduled time arrived.
- A session/thread was created.
- The automation prompt was not injected.
- No task turn occurred.
- No tool calls occurred.
- No completion event occurred.
Impact
Scheduled automations can appear active and may create threads, but silently do no work. This is risky because users may believe scheduled business workflows are running when they are not.
Sensitive Information Redacted
The following information has been intentionally removed from this report:
- Local Windows username
- Business name
- Client names
- Full local file paths
- Real automation names tied to business workflows
- Real source/output folder names
- Real business workflow prompts
Request
Please investigate why Codex Desktop scheduled cron automations can create a session/thread without injecting the saved automation prompt or starting a task turn.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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 execRelated issue: #19011
This matches the Windows empty-session signature I reported in #19011.
The common pattern across #19011, #19969, and #20076 appears to be:
session_meta/thread_name_updatedI initially worked around this by converting some jobs to existing-thread heartbeat automations, but that is not a stable general workaround. Once several heartbeats have persisted
target_thread_idlinks, Desktop can start failing earlier in the resume path withthread/resumetimeouts orcannot resume running thread with mismatched patherrors. That newer target-thread failure seems related to #19563 / #20317.So my current read is that there are at least two automation lifecycle bugs:
Both happen before the user’s automation prompt actually runs.
it's been like this for two weeks now, it is maddening
Me, too.
I can reproduce this automation-dispatch family on macOS, with a variant that gets further than the empty-session reports above: the prompt is submitted and a turn starts, but Desktop falsely completes it before any model response.
26.707.62119; bundled Codex CLI0.144.2gpt-5.6-sol, reasoninghigh019f5ded-8e30-7d82-9972-aec2d46ee9d5019f5ded-9a10-7262-89c9-0dc50d955596The rollout contains
thread_settings_applied,task_started, correctturn_context, the full saved prompt as bothresponse_item role=useranduser_message, then:There is no assistant message, reasoning item, tool call, explicit error, or non-null token usage. The Scheduled preview still said
Last run: never, and no requested output was created.At 11:10:28 +0800, a manual follow-up in the same thread started immediately; the first assistant message arrived at 11:10:32.966 and normal token usage/file changes followed. The model, project cwd, and write scope were the same. The app had auto-updated at 10:22 from
26.707.62119to26.707.71524, so the manual control was on the newer build.Sleep is ruled out: macOS power logs show no sleep/wake transition around 08:00, and the Electron process held a no-idle-sleep assertion before and after the run.
One possible clue: the failed null token event used rate-limit context
limit_id=premium, no plan type, zero credits; the successful manual turn usedlimit_id=codex,plan_type=pro, with normal usage. This may be unattended entitlement routing, but that is only an inference.This appears to be a scheduler/execution lifecycle bug after prompt injection and before model dispatch. Even if dispatch fails, Desktop should record an explicit error rather than
task_completewithlast_agent_message=nulland staleLast run: neverbookkeeping.