Codex Desktop Automations badge shows stale high count after automation run cleanup
Summary
Codex Desktop's sidebar Automations badge can show a large stale count even after the real automation registry and local active thread/session state are clean.
In this case, the sidebar continued to show hundreds of automation items (for example, 885) even though local checks showed only 21 real automation definitions, with 19 paused and 2 active lightweight sentinel jobs.
Observed behavior
- Codex Desktop sidebar shows a high Automations badge count.
- The count persists after restarting Codex Desktop.
- The count also persisted after a full Mac restart.
- Some stale automation/standby conversations were still discoverable through app-level thread search and could be archived individually, but the sidebar badge remained much higher than the searchable remaining items.
Expected behavior
The Automations badge should reflect the current actionable automation items/runs, or it should provide a way to bulk archive/clear stale completed automation run history. It should not continue to show hundreds of stale items after the backing automation/thread/session state is clean.
Local verification performed
Sanitized local verification showed:
- Real automation definitions: 21
- Paused heavy automations: 19
- Active lightweight sentinel automations: 2
- Active local automation rows in Codex thread database: 0
- Active local automation session files under the Codex sessions tree: 0
- App-level thread search for known automation titles such as Email Monitoring and Layer E Sent-Mail Fulfillment returned no automation-run threads.
- App-level thread search did find several stale Proposal Intelligence standby rollover threads; archiving those via the app thread archive API caused those searches to return empty, but did not resolve the sidebar badge count.
Example local checks used conceptually:
threads where archived = 0 and title/preview begins with Automation: => 0
active automation session files under ~/.codex/sessions => 0
~/.codex/automations/*/automation.toml => 21
Impact
This makes it difficult to tell whether automations are actually active or whether stale automation run history is accumulating. It also undermines trust during credit-burn investigations, because the UI implies hundreds of automation items even when the real registry and active local state are clean.
Request
Please consider adding one or more of the following:
- Make the Automations badge reflect only actionable/current automation items.
- Expose stale/completed automation run history separately from real automations.
- Add a supported bulk archive/clear completed automation-run history action.
- Ensure the sidebar count refreshes after app restart and after thread archive operations.
Environment
- Product: Codex Desktop for macOS
- Area: Automations sidebar/counting/archive behavior
- Date observed: 2026-06-08
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I reviewed the duplicate candidate #26857.
This issue is related, but I do not think it is an exact duplicate.
#26857 requests a bulk way to mark previous automation runs as read when the previous runs are still present and individually clearable. The case here appears to be a stale/sidebar-counting bug: after local cleanup and app-level archive operations, the real automation registry showed 21 definitions, active local automation rows/files were 0, and searches for known automation-run titles were empty, but the Automations sidebar badge still showed hundreds of items.
So this may share the same user-facing symptom, but the underlying issue may be different: the badge appears to be counting stale automation/run history that is no longer exposed through the normal thread/automation surfaces.
I can add a related sanitized repro from Codex Desktop Automations. I also uploaded diagnostics through in-app feedback: Feedback ID
019ec568-fe9b-7ca0-85e5-86e7b313af89.What I observed:
118.23automation definitions:19active and4paused.118count matched unread automation run rows withstatus = PENDING_REVIEWandread_at = NULL.118runs by metadata and classified89as archive-safe after review,20as keep visible, and9as project follow-up.12loaded threads archived successfully.38archive attempts failed withNo AppServerManager registered.39archive-safe candidates.77reviewed archive-safe historical automation threads remain blocked and still count toward the pending-review/sidebar state.This looks like a combination of:
I did not edit SQLite, hidden app state, session files, automation definitions, config, hooks, or local thread/index state by hand.
Requested product route:
No AppServerManager registered.Related: #26857, #20418, #23246, #27202, #26658.
Additional current UI evidence for the same issue:
113.23automation definitions total:19current and4paused.113vs visible definitions23.So the badge/read-state count is still far above the currently visible automation definitions even after the earlier supported archive pass reduced the count from the previous
118state.<img width="125" height="43" alt="Image" src="https://github.com/user-attachments/assets/41e03eed-abec-471d-9f4c-42acea77f905" />
how to clean the counter?