Repository navigation
Codex Desktop Archived Chats page discards SSH remote archived threads #29600
Description
What version of the Codex App are you using?
Local macOS Codex Desktop: 26.616.71553 (CFBundleVersion 4265)
Bundled local CLI: codex-cli 0.142.0
Remote Linux CLI/app-server: codex-cli 0.141.0
What platform is your computer?
Local: macOS arm64 Codex Desktop
Remote: Linux SSH managed remote project
What issue are you seeing?
Settings > Archived Chats does not show archived chats for an SSH remote host/project. The page always renders the empty state (No archived chats) even though the remote host has archived threads in ~/.codex/state_5.sqlite and ~/.codex/archived_sessions.
This is not data loss and does not appear to be a remote Codex version/config problem. The remote archive data is present.
Remote metadata check, with host/user/path details redacted:
codex --version
codex-cli 0.141.0
sqlite3 ~/.codex/state_5.sqlite \
"select archived, count(*) from threads group by archived;"
archived=0 count=2
archived=1 count=2
sqlite3 ~/.codex/state_5.sqlite \
"select id, title, archived, source, cwd, datetime(updated_at, 'unixepoch')
from threads where archived=1 order by updated_at desc limit 10;"
<thread-id-1> | hello | 1 | vscode | /home/<user>/workspace | 2026-06-09 10:34:34
<thread-id-2> | <redacted title> | 1 | vscode | /home/<user>/workspace | 2026-06-06 11:05:27
find ~/.codex/archived_sessions -type f -name "*.jsonl" | wc -l
2
Expected behavior
When the selected Settings host is an SSH remote host, Settings > Archived Chats should display the archived threads returned by that host's list-archived-threads / thread/list archived:true path.
Actual behavior
The UI shows No archived chats for the remote host, despite archived rows and archived JSONL files existing remotely.
Likely root cause
I inspected the current Desktop app bundle to avoid guessing. In the extracted webview bundle, the archived chats settings page does call list-archived-threads with the selected host id:
queryKey:[`archived-threads`,t],
queryFn:()=>s(`list-archived-threads`,{hostId:t})But when it builds the entries passed to the archived chat list, it only preserves the returned thread data when the selected host is exactly local:
let a=t===`local`?u:[]
...
A=xe({
automationThreadIds:c,
cloudTasks:m,
localThreads:a,
projects:k,
projectlessThreadIds:new Set(r??[]),
threadProjectAssignments:i,
threadWorkspaceRootHints:o
})So for any SSH remote host, the app can fetch archived threads into u, then discards them by setting localThreads to []. That makes the remote archived list empty even when the host returns data.
This looks like a Desktop archived-page bug, not a user SSH config issue and not missing archive support in the remote server.
Steps to reproduce
- Connect Codex Desktop on macOS to a Linux SSH remote project.
- Create or use an existing remote conversation.
- Archive that conversation from the remote project UI.
- Open
Settings > Archived Chatsand select the SSH remote host. - Observe that the UI says there are no archived chats.
- SSH into the remote host and inspect
~/.codex/state_5.sqliteor~/.codex/archived_sessions; the archived conversation is present.
Related issues
This is related to the broader remote history/sidebar hydration reports, especially #25092 and #27284, but this specific archived-chats failure appears to have a separate client-side cause in the Settings archived page.
Please fix this in the Desktop UI rather than expecting users to reset local state or edit SSH config. Archive is currently a destructive-feeling action for remote projects because the only recovery UI cannot see the remote archive.
Activity
yanggs07 commentedon Jun 26, 2026
Update: this still reproduces after updating to the current macOS Desktop build.
Current local app:
I re-extracted the updated
app.asarand the same client-side discard logic is still present inwebview/assets/data-controls-CHizTqlN.js. The variable names changed, but the behavior is identical:So the latest app still fetches archived threads with the selected remote host id, then discards the returned thread list for every non-
localhost before rendering. The visible symptom remains: selecting an SSH remote host under Settings > Archived Chats shows the empty state even though the remote host has archived rows/files.This makes Archive effectively one-way for SSH remote users from the Desktop UI. Please prioritize this as a Desktop UI bug rather than a remote Codex version/config issue.
yanggs07 commentedon Jul 2, 2026
Update: still reproduces on a newer current macOS Desktop build.
Current local app:
I re-extracted this build:
The same client-side discard logic is still present, now in:
Relevant minified snippet from this build:
So in build 4598 the Archived Chats settings page still fetches archived threads for the selected host id, but then passes an empty thread list into the renderer for every non-
localhost.This also lines up with #30312, where another investigation confirmed the Rust/app-server
thread/listarchived path and tests are fine, and the failure appears to be Desktop webview/client-side.Please route this to the Desktop/webview owner. For SSH remote users, Archive still behaves like a one-way hide operation because the only recovery UI drops the remote archive results before render.
hongjieh commentedon Jul 6, 2026
Additional reproduction on a newer macOS Desktop build, with the same client-side discard path.
Environment:
26.623.101652CFBundleVersion:4674remote-control:env_e_<redacted>codex-cli 0.141.0Observed behavior:
Settings > Archived chatswith the remote host selected renders the empty state (No archived chats).Bundle inspection from this build still shows the same behavior, now in:
Relevant minified snippet:
For a selected remote host,
tis notlocal, so the archived threads returned intolare replaced with[]before rendering. This exactly matches the UI symptom on this build as well.This still looks like a Desktop/webview issue rather than remote SQLite data loss or a remote app-server listing failure.
yanggs07 commentedon Jul 10, 2026
Update: still present in the current integrated ChatGPT/Codex macOS app build.
The Codex app is now running from the ChatGPT app bundle on this machine rather than
/Applications/Codex.app:The same webview-side discard logic is still in this build, now in:
Relevant minified snippet:
So as of build 5059, selecting an SSH/remote host in Settings > Archived Chats still fetches remote archived threads, then replaces the returned list with
[]before rendering because the selected host id is notlocal.This is still reproducible after the app moved under
/Applications/ChatGPT.app, so the Desktop/webview fix has not landed yet.KachurPro commentedon Jul 10, 2026
I can independently reproduce this on the current integrated ChatGPT/Codex macOS app.
Environment:
26.707.31428(build5059)0.144.1Evidence:
ok.hostIdand then discards the list for non-local hosts before rendering (selectedHostId === "local" ? archivedThreads : []).No host names, addresses, local paths, thread IDs, or titles are included here. This confirms the issue persists with remote app-server
0.144.1and is a Desktop/webview listing bug, not remote data loss. For SSH users, Archive remains effectively one-way in the UI.MMEurope commentedon Oct 13, 2026
Guys who's going to ship a fix? This has been going on forever and is highly annoying.