Desktop: local pinned threads appear gone after app update when last host was remote SSH
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.803.61601 (ChatGPT macOS desktop / Codex UI)
What subscription do you have?
ChatGPT Pro / Plus (desktop Codex)
What platform is your computer?
Darwin 25.x.x arm64 (macOS)
Also: standalone codex-cli 0.147.0 present on the same machine.
What issue are you seeing?
After updating or relaunching the ChatGPT/Codex desktop app, previously pinned local threads disappear from the sidebar.
The threads are not deleted. On disk they remain:
is_pinned = 1with correctnamein~/.codex/state_5.sqlite(threadstable)- present in
pinned-thread-idsin~/.codex/.codex-global-state.json
What actually changes is host/project context restored by the app:
selected-remote-host-idis restored to a remote SSH-discovered host (notlocal)selected-projectis often a remote project on that host
The sidebar only lists threads for the currently selected host/project, so local pinned threads are filtered out and look like they were wiped by the update.
Switching the host selector back to This Mac / local (or rewriting selected-remote-host-id to local and fully quitting + reopening the app) restores the pins without re-pinning.
This has reproduced multiple times after app updates / relaunches on a multi-host setup (local Mac + remote Mac via Remote SSH / remote control).
No error dialog is shown.
What steps can reproduce the bug?
- On Codex desktop (macOS), configure at least two hosts: local and a remote SSH host.
- On local, create or open several long-lived operator/work threads and pin them. Confirm they appear under Pins when host = local.
- Switch host to the remote machine and optionally select a remote project. Work there so the last-used host/project is remote.
- Quit the app fully (or apply a ChatGPT/Codex desktop update and relaunch).
- Observe: previously pinned local threads are missing from the sidebar Pins list.
- Inspect local state (optional diagnostic):
- SQLite still has
is_pinned=1for those thread IDs pinned-thread-idsstill contains those IDsselected-remote-host-idis the remote host id (e.g.remote-ssh-discovered:<hostname>)selected-projectmay be{ "type": "remote", "projectId": "..." }
- SQLite still has
- Switch host selector to This Mac / local (and a local project if needed).
- Observe: the same pins reappear without re-pinning.
What is the expected behavior?
One or more of:
- After update/relaunch, do not leave the user in a host context where their primary pinned local threads are invisible without explanation.
- If the sidebar is host-scoped, show an explicit empty/filter state, e.g. “N pinned threads on This Mac” / “Pins hidden by host filter,” with a one-click switch to local.
- Prefer keeping a global pins section (or cross-host pin indicators) so pin data and pin UX stay aligned.
- If host restore to remote is intentional, document it; today it reads as “update deleted my pins.”
Actual behavior
- Pins appear deleted after desktop update/relaunch.
- Core pin data remains healthy on disk.
- Root cause is view filter + restored remote host/project, not pin storage loss.
- Recovery: switch host to local (or set
selected-remote-host-idtolocalwhile the app is fully quit, then reopen).
Evidence (neutralized)
When pins looked “gone”:
| Store | Observed |
|---|---|
state_5.sqlite threads.is_pinned |
still 1 for all affected threads |
threads.name |
still set (named operator threads) |
.codex-global-state.json pinned-thread-ids |
still listed the same IDs |
selected-remote-host-id |
remote-ssh-discovered:<remote-hostname> |
selected-project |
remote project on that host |
After setting host to local + full quit/reopen: pins visible again.
Paths/hosts in this report are redacted; reproduction only needs multi-host desktop + local pins + last session on remote.
Related issues
Similar multi-host / pin visibility problems (may not be the same root cause):
- #37310 — pinned conversations disappear after restart (Windows; reappear after pinning another chat)
- #33579 — desktop hides searchable recent pinned local task
- #34076 — desktop hides threads while core DB remains healthy
- #26640 — remote control fetches remote threads but sidebar stays on local (inverse host mismatch)
This report is specifically: local pins hidden because last selected host was remote after app update/relaunch, with pin bits still correct on disk.
Suggested product fix (non-prescriptive)
- On cold start after update, if
pinned-thread-idsincludes local threads not visible under the restored host, surface a banner or auto-prefer local for the pins surface. - Or split pin list by host and always show local pins when present.
- Avoid overwriting a user-corrected
selected-remote-host-idfrom in-memory state on quit if the user already switched host in a previous session (secondary race when editing global state while app is open).
Workaround
- Host selector → This Mac / local
- Or fully quit the app, set
selected-remote-host-idtolocalin~/.codex/.codex-global-state.json, reopen
Happy to provide redacted diagnostics if useful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with local and remote SSH hosts, local pinned threads, and a relaunch after the last session uses the remote host. Trace restoration of selected-remote-host-id and selected-project together with the sidebar's host/project filtering; done means local pins are not misleadingly hidden, or the UI clearly explains the filter and provides a path back to local pins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100