Codex Desktop Automations badge shows stale high count after automation run cleanup

Open 💬 5 comments Opened Jun 8, 2026 by nakita-creator
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #26857

Powered by Codex Action

nakita-creator · 2 months ago

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.

omarpinarecords · 2 months ago

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:

  • Automations sidebar badge showed 118.
  • Local app readback showed 23 automation definitions: 19 active and 4 paused.
  • The 118 count matched unread automation run rows with status = PENDING_REVIEW and read_at = NULL.
  • I reviewed all 118 runs by metadata and classified 89 as archive-safe after review, 20 as keep visible, and 9 as project follow-up.
  • I used only the supported app/archive route on reviewed archive-safe items.
  • 12 loaded threads archived successfully.
  • 38 archive attempts failed with No AppServerManager registered.
  • I stopped after the repeated app-layer failure and did not try the remaining 39 archive-safe candidates.
  • Result: 77 reviewed archive-safe historical automation threads remain blocked and still count toward the pending-review/sidebar state.

This looks like a combination of:

  1. unread completed automation runs needing a supported bulk mark-read or clear action; and
  2. not-loaded historical automation threads that cannot be archived or cleared through the supported app route.

I did not edit SQLite, hidden app state, session files, automation definitions, config, hooks, or local thread/index state by hand.

Requested product route:

  • bulk mark completed previous automation runs as read;
  • archive or mark-read reviewed not-loaded historical automation threads; or
  • repair/refresh the Automations badge/sidebar/index after supported archive attempts fail with No AppServerManager registered.

Related: #26857, #20418, #23246, #27202, #26658.

omarpinarecords · 2 months ago

Additional current UI evidence for the same issue:

  • A Codex Desktop sidebar screenshot from 2026-06-14 showed the Automations badge at 113.
  • At the same time, the Automations page visible list showed only 23 automation definitions total: 19 current and 4 paused.
  • I am not posting the visible automation names because several include private workspace labels; the relevant product mismatch is the public-safe count comparison: badge 113 vs visible definitions 23.

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 118 state.

temuera · 1 month ago

<img width="125" height="43" alt="Image" src="https://github.com/user-attachments/assets/41e03eed-abec-471d-9f4c-42acea77f905" />

how to clean the counter?