Remote SSH threads disappear or fail to open because pinned-thread hydration is routed to the local app server

Open
#33,359 3 comments 1 reaction 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
Quiet
Tech stack
rust

Research direction

Start with the desktop logs for source=thread_hydration and method=thread/read, then inspect how pinned thread IDs from %USERPROFILE%\.codex\.codex-global-state.json are routed after startup. Reproduce with a remote SSH thread while the local host is active, comparing thread/list or thread/search host IDs with the failing read. Done means remote pinned threads route to the correct host and remain represented when that host is unavailable.

Written by the indexing model from the issue text.

Description

app app-server bug remote

Product: Codex desktop app for Windows
Area: Remote SSH connections, thread sidebar, pinned threads, cross-host routing
Severity: High / data-loss appearance; persistent workflow disruption
Frequency: Repeatedly reproducible, including on the current app startup
Actual data loss: No server-side deletion observed. The threads remain discoverable through cross-host thread listing/search and become readable when requests are routed to the correct remote host.

Environment

  • Windows Codex package: OpenAI.Codex_26.707.9981.0_x64
  • Runtime release reported by the active desktop log: 26.707.72221
  • Codex core/command runner: 0.144.2
  • Remote type: Codex-managed SSH connection
  • One managed SSH host, 21 saved remote projects
  • Six pinned remote thread IDs persisted in local global state
  • Local state file: %USERPROFILE%\.codex\.codex-global-state.json
  • Desktop logs: %LOCALAPPDATA%\Codex\Logs\2026\07\...
  • Investigation date: 2026-07-15 (America/New_York)

Expected behavior

Remote threads should remain visible and openable after restarting Codex, switching between local and remote projects, or temporarily losing the SSH connection. If a remote host is offline, the UI should preserve the thread entry and show an explicit unavailable/offline state. It should not omit the thread, treat it as nonexistent, or route its ID to another host.

This matches the documented product model:

  • Remote connections support continuing existing tasks and switching between connected hosts and tasks.
  • A disconnected or sleeping host makes remote access temporarily unavailable; it does not delete tasks.
  • Pinning changes where a task appears in the sidebar; it does not change task identity or accessibility.
  • The documented sidebar troubleshooting paths are Chronological filtering and Archived tasks. Neither explains these failures, and the affected threads are not archived.

Actual behavior

On app startup or after returning to a local-host context, remote pinned threads disappear from the sidebar or fail to open. The desktop client logs thread/read failures with JSON-RPC error -32600 and message thread not loaded: <remote-thread-id>.

The same remote thread IDs are subsequently returned by cross-host thread/list or thread/search with the correct remote hostId. When explicitly read through that remote host, they succeed. This demonstrates that the threads still exist and that the failure is client-side host routing/hydration, not deletion.

Minimal reproduction

  1. Configure a Codex-managed SSH host and save at least one remote project.
  2. Open the remote project and create a thread.
  3. Pin that remote thread.
  4. Switch to a local project or close Codex while the local host is the initial/default context.
  5. Restart Codex.
  6. Observe the pinned remote thread section/sidebar before the remote SSH app server finishes connecting.
  7. Try to open the remote pinned thread from the local-host view.
Result
  • The remote thread may be absent, may lose its pinned/sidebar representation, or may fail to open.
  • The log shows source=thread_hydration or source=thread, method=thread/read, errorCode=-32600, and thread not loaded.
  • Searching/listing across connected hosts still returns the thread with the remote hostId.
  • Reading the thread after resolving/routing to the remote host succeeds.
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.