openai / openai/codex

[Regression][macOS Desktop] Orphaned “New task” sidebar entries cannot be archived or deleted

Open
#38,724 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

app bug session
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

Summary

Codex Desktop created 12 phantom sidebar entries titled New task / 新任务. The entries had voice-waveform icons and could not be opened, archived, or deleted through the normal UI.

This appears to be a recurrence or incomplete fix of #32578.

Environment

  • Platform: macOS (Apple Silicon)
  • App: Codex Desktop / ChatGPT Desktop powered by Codex
  • Date reproduced: 2026-08-15
  • Locale: Chinese

The exact app version was not available from the current diagnostic session.

Actual behavior

  1. Multiple sidebar entries named 新任务 appeared in two tightly clustered batches.
  2. The normal thread-list API did not return these entries.
  3. Attempts to archive their thread IDs returned:
    No Codex thread found for threadId: <redacted>. Hosts without a readable match: local
  4. The entries therefore could not be removed through either the UI or the supported archive operation.

Local-state evidence

The 12 IDs were present in:

~/.codex/.codex-global-state.jsonprojectless-thread-ids

However, there were no matching rollout/session files under:

  • ~/.codex/sessions/
  • ~/.codex/archived_sessions/

This indicates the sidebar index was persisted even though task/rollout creation did not complete.

No private paths, prompts, account identifiers, or raw logs are included here.

Workaround that succeeded

  1. Back up ~/.codex/.codex-global-state.json.
  2. Remove only the 12 stale IDs from projectless-thread-ids.
  3. Validate the resulting JSON and restart/refresh Codex.

After cleanup, the stale-ID intersection count was zero.

Expected behavior

  • A sidebar entry should be committed only after its underlying thread/rollout is durable.
  • If task initialization fails, the pending sidebar entry should be rolled back.
  • Startup reconciliation should automatically prune or quarantine projectless-thread-ids that have no corresponding readable thread/rollout.
  • Archive/delete should handle orphaned sidebar records instead of returning “No Codex thread found.”

Suggested fix

Use transactional/atomic creation across thread persistence and sidebar indexing, plus a reconciliation pass that validates persisted sidebar IDs against the thread store. A safe “remove stale task reference” operation would also let the UI recover without manual JSON editing.

Related: #32578

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.

Research direction

Start with ~/.codex/.codex-global-state.json and the projectless-thread-ids entry, then inspect the creation and startup reconciliation paths against ~/.codex/sessions/ and ~/.codex/archived_sessions/. Done means failed task initialization leaves no sidebar entry, stale IDs are pruned or quarantined, and archive/delete no longer reports that the Codex thread is missing.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.