You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Windows Desktop] Same thread id on local and SSH remote host: Desktop routes to the stale remote copy and never reconciles remote deletions #52410
appIssues related to the Codex desktop appbugSomething isn't workingremotesessionIssues involving session (thread) management, resuming, forking, naming, archivingwindows-osIssues related to Codex on Windows systems
When the same thread id exists on both the local host and an SSH remote host (remote-ssh-discovered:*), Codex Desktop routes the thread to the remote copy, and after the remote copy is deleted the desktop catalog never forgets it. Pinned threads became unopenable (invalid paginated history lineage ...: missing source rollout, failed to resolve rollout path, no rollout found for thread id) while their local rollouts were intact.
Environment
Codex Desktop on Windows 11 (26.1002.7124.0, then 26.1007.2314.0), local runtime 0.162.0-alpha.2
SSH remote host (macOS) running codex-cli 0.160.0, connected via remote-ssh-discovered
How the duplicate arose
A file-sync tool had copied the Windows host's ~/.codex/sessions into the remote host's live ~/.codex/sessions months earlier. The remote app-server registered those rollouts as its own threads (110 rows, cwd like C:\... or /Users/<user>/C:\...). So 92 thread ids existed on both hosts. (The sync was a user mistake; the issue is how Desktop resolves it.)
Observed
sqlite/codex-dev.db → local_thread_catalog held two rows per id (local and the remote host). Opening a pinned thread routed to the remote host (log: maybe_resume_started ... hostId=remote-ssh-discovered:...), where the rollout no longer existed. The UI shows a globe icon but offers no way to choose the host.
Disconnecting the remote host made the same threads open locally — confirming routing, not data loss.
We removed the 92 rows on the remote with the official thread/delete (app-server JSON-RPC) while Desktop was closed. After reconnecting, Desktop still routed to the remote: the catalog is synced incrementally (local_thread_catalog_sync_state.watermark_updated_at) and deleted threads are never re-observed. last_full_reconciled_at for that host was 5 weeks old. Removing the stale catalog rows (app closed) fixed routing.
One local thread also had thread-project-assignments → remote project/host in .codex-global-state.json; it kept opening on the remote (no rollout found for thread id) until that assignment was removed.
Expected
For an id present on several hosts, prefer the host that actually has a readable rollout (or local), or let the user choose the host.
Periodically reconcile the catalog against each host (drop rows the host no longer has), or react to thread/deleted on reconnect.
A thread assigned to a remote project should not be routed to a host that does not have it.
appIssues related to the Codex desktop appbugSomething isn't workingremotesessionIssues involving session (thread) management, resuming, forking, naming, archivingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Oct 9, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action