Windows desktop taskbar badge remains unread due to archived and closed subagent thread IDs

Open
#35,228 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
desktop

Research direction

Start by tracing the persisted unread-thread-ids-by-host-v1.local state into Windows taskbar badge recomputation, then inspect how archived threads and closed child/subagent spawn edges are represented. Done means opening or archiving a task and closing an unreachable child removes its unread state, and the badge clears when no actionable unread tasks remain.

Written by the indexing model from the issue text.

Description

app bug session subagent windows-os
What version of the Codex App are you using?

26.721.3996.0

What platform is your computer?

Windows (x64)

What issue are you seeing?

The Windows taskbar icon continues to show an unread badge (1) even after every visible task has been opened/read.

A read-only inspection of the local persisted app state shows that the badge is backed by a non-empty entry at:

electron-persisted-atom-state.unread-thread-ids-by-host-v1.local

At the time of inspection, this array contained five thread IDs. Cross-checking those IDs against the read-only thread database showed:

  • one thread with threads.archived = 1
  • two child/subagent threads whose thread_spawn_edges.status = "closed"
  • two ordinary, non-archived threads, including the task that was currently open in the foreground

The two closed child threads are not reachable as normal sidebar tasks, so the user has no UI path to mark them read. The archived thread also remains in the unread set after archival. During verification, the currently open task was newly added to the unread array, increasing it from four entries to five.

The taskbar displays 1 rather than the number of stored IDs, which suggests the Windows badge is being used as a boolean (any unread) while stale/unreachable IDs keep the condition permanently true.

No local state was modified during diagnosis.

What steps can reproduce the bug?
  1. Use Codex Desktop on Windows and create tasks that spawn subagents/child threads.
  2. Allow the child threads to finish and reach closed status.
  3. Open/read all tasks visible in the sidebar.
  4. Archive a task that has previously been considered unread.
  5. Observe that the Windows taskbar icon continues to show an unread badge of 1.
  6. Restarting or revisiting visible tasks may not clear the badge because closed child-thread IDs and archived-thread IDs remain in unread-thread-ids-by-host-v1.local.

The problem can also occur for an ordinary task: a task that is currently open may still be present in the persisted unread array.

What is the expected behavior?
  • Opening a task should reliably remove its ID from the persisted unread set.
  • Archiving a task should remove its ID from the unread set.
  • Closed child/subagent threads that are not independently reachable in the UI should not contribute to the application/taskbar unread badge.
  • On startup or badge recomputation, the app should prune unread IDs that refer to archived threads, closed child threads, or otherwise unreachable records.
  • The Windows taskbar badge should clear immediately when there are no actionable unread tasks.
Additional information

This appears related in theme, but not identical, to automation-specific macOS reports such as #20418 and #26857. This report concerns Windows taskbar state, ordinary tasks, archived tasks, and closed subagent threads rather than unread automation runs.

Potential defensive fix:

  1. Remove an ID transactionally when a thread is opened/read or archived.
  2. Do not add independently hidden child threads to the global unread collection, or clear them when the spawn edge becomes closed.
  3. Before setting the OS badge, reconcile the unread collection against thread metadata and filter archived = 1, closed child edges, and missing/unreachable threads.

All identifiers, task titles, user paths, and conversation contents have been omitted from this report.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.