Codex Desktop automation run is immediately auto-archived after start

Open 💬 1 comment Opened Apr 27, 2026 by Yifo98

Summary

A Codex Desktop cron automation starts successfully, but the run is immediately interrupted and auto-archived before any work is performed.

This appears to happen in the Codex Desktop automation runner / thread lifecycle rather than in the user's automation script. A separate read-only smoke check of the underlying local script completed successfully.

Environment

  • Product: Codex Desktop
  • Codex Desktop client version observed in logs: 26.422.30944
  • Codex CLI/runtime version in session metadata: 0.125.0-alpha.3
  • OS: macOS
  • Execution environment: local
  • Model: gpt-5.5
  • Reasoning effort: medium

Example run

  • Automation: AI Radar 早报(重建版)
  • Automation ID: ai-radar-morning
  • Workspace: ~/XiaoFu_Workspace/02_Dev_Projects/Codex_OpenAI
  • Run time: 2026-04-27 09:03:08 local time
  • Thread ID: 019dcc76-25f7-7f73-a5c7-a0d57a013680

Observed behavior

The automation thread was created, renamed, and received the automation prompt, but within about 625ms it was shut down and archived automatically.

No automation work was performed:

  • No command from the automation prompt ran
  • No assistant output was produced
  • No inbox summary was created
  • The run was moved to archived history

Local database state for the run:

automation_runs.status = ARCHIVED
archived_reason = auto
inbox_summary = empty

The archived session contains only the initial thread setup and an immediate abort:

session_meta
thread_name_updated
task_started
<turn_aborted>
turn_aborted reason=interrupted duration_ms=625

Relevant log sequence

From ~/.codex/logs_2.sqlite, around the same timestamp:

thread/start succeeds
SetThreadName succeeds
UserInputWithTurnContext is submitted
Shutdown is submitted almost immediately
running task is aborted
thread/archive is called while had_active_turn=true

Relevant log excerpts, with account-specific information omitted:

Submission ... op: UserInputWithTurnContext ... Automation ID: ai-radar-morning ... model: gpt-5.5 ...
Submission ... op: Shutdown
aborting running task task_kind=Regular sub_id="019dcc76-2633-7860-8fd2-7ddfe8d5789a"
Shutting down Codex instance
failed to record rollout items: thread 019dcc76-25f7-7f73-a5c7-a0d57a013680 not found
thread/archive ... had_active_turn=true

Expected behavior

A cron automation should continue running until the assistant completes, fails with an explicit error, or is manually stopped by the user.

If the runner shuts down a task automatically, the UI should show a clear failure reason instead of silently archiving the run with an empty summary.

Impact

Recurring automations can appear ACTIVE and scheduled correctly, but the actual run is lost immediately. This makes the automation unreliable and difficult to diagnose from the UI, because the visible result is just an archived run with no useful summary.

Additional note

This pattern has occurred on multiple automation runs. Some runs complete normally, but others are aborted within a few hundred milliseconds to a few seconds after start.

Feature request: delete run records, not only archive

Please add a real delete/remove action for automation run records and archived threads, separate from archive.

Current archive behavior only hides or stores the run. For empty, failed, accidental, or auto-archived runs, users need a way to permanently delete the record from the UI/history, preferably with a confirmation dialog.

Useful actions would include:

  • Delete this run record
  • Delete archived run records for this automation
  • Clear empty auto-archived runs

This would make automation history much easier to maintain, especially when debugging recurring jobs.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗