openai / openai/codex

Codex desktop repeatedly retries remote thread resume after persistent database I/O errors (~1.12s interval)

Open
#45,385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app app-server bug remote
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.903.61454 (build 8378), read from the installed app bundle metadata.

What subscription do you have?

Not provided.

What platform is your computer?

macOS 26.5, arm64. uname -mprs: Darwin 25.5.0 arm64 arm.

What issue are you seeing?

Summary

Resuming an existing conversation on an SSH remote fails with a thread-store database I/O error. The desktop app then repeatedly attempts to read and resume the same conversation. The user observes an ongoing recovery loop.

In a fixed 307-second log window, the app recorded 273 resume starts, 273 failed thread/read requests, and 272 failed thread/resume requests for the same conversation. The last start is near the window boundary. Retry intervals stay approximately constant, with no increasing backoff or stop observed in this window. Retries also occur with rendererWindowFocused=false and rendererWindowVisible=true.

Environment

  • macOS 26.5, arm64
  • Desktop version: 26.903.61454 (build 8378)
  • Bundle identifier: com.openai.codex (installed bundle is named ChatGPT.app)
  • Local and SSH remote app-server versions reported in logs: 0.153.4
  • Connection: SSH remote (remote-ssh-discovered:<HOST>)
  • Observed: September 14, 2026
  • Analyzed window: 08:31:53–08:37:00 UTC / 16:31:53–16:37:00 Asia/Shanghai
What steps can reproduce the bug?
  1. Connect the desktop app to an SSH remote with an existing conversation.
  2. Open/resume that conversation while the remote thread store returns the database error below.
  3. Observe repeated automatic read/resume attempts after the failure.

This describes the observed incident. A clean reproduction from a healthy database and the cause of the database I/O failure have not been established; no fault injection or database modification was performed.

Actual behavior

The following sequence repeats for the same conversation:

  1. maybe_resume_started, previousResumeState=needs_resume, previousStreamRole=null.
  2. thread/read fails with JSON-RPC code -32603.
  3. Failed to read thread metadata before resume is logged.
  4. thread/resume is attempted and fails with the same error.
  5. Failed to resume conversation is logged.
  6. Another maybe_resume_started follows, repeating the sequence.

Concurrent thread/list calls also fail with state DB unavailable for filtered thread listing.

Measured start-to-start intervals: minimum 0.873s, median 1.120s, maximum 1.331s. Median interval for the first 50 intervals is 1.1255s; for the last 50 it is 1.119s. First resume failure in the window: 08:31:54.168Z; last: 08:36:59.092Z.

Errors

failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error
failed to list threads: thread-store internal error: state DB unavailable for filtered thread listing

Both failed thread/read and thread/resume requests use source=thread_hydration and priority=critical. Resume requests specify timeoutMs=120000, but sampled failures return in roughly 90ms, so these are repeated error responses rather than individual requests waiting for that timeout.

What is the expected behavior?

After persistent resume errors, transition to a stable error state and offer an explicit retry/reconnect action. If automatic retries are appropriate, apply bounded retries and backoff so an unavailable thread store does not cause continuous recovery attempts and log spam.

Additional information

The logs establish the repeated recovery behavior and the database error returned by the remote. They do not establish why the database I/O failed or which internal UI scheduling mechanism causes another attempt. The observed loop is consistent with repeatedly re-entering recovery while the conversation remains needs_resume; that is a lead for investigation, not a confirmed source-level diagnosis.

The inline sanitized-log.txt excerpt below contains consecutive recovery cycles with original UTC timestamps and source line numbers. Conversation/request identifiers and the SSH host alias are replaced with placeholders. The full raw log is intentionally excluded from the issue attachment.

Related: #36189 describes slow hydration requests saturating the queue and causing reconnects. This report concerns rapid database error responses followed by repeated resume attempts.

sanitized-log.txt — consecutive recovery cycles
11517: 2026-09-14T08:36:55.384Z info [electron-message-handler] maybe_resume_started conversationId=<ID> documentVisibilityState=visible hostId=remote-ssh-discovered:<HOST> previousResumeState=needs_resume previousStreamRole=null rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true routePath=/index.html
11519: 2026-09-14T08:36:55.448Z error [electron-message-handler] Request failed conversationId=<ID> durationMs=63 error={"code":-32603,"message":"failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error"} failureReason=null id=<ID> method=thread/read pendingCountAfter=0 priority=critical queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=thread_hydration spanId=null timeoutMs=0 traceId=null
11520: 2026-09-14T08:36:55.448Z warning [electron-message-handler] Failed to read thread metadata before resume conversationId=<ID> errorMessage="failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" errorName=Error errorStack="Error: failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true
11528: 2026-09-14T08:36:55.720Z error [electron-message-handler] Request failed conversationId=<ID> durationMs=92 error={"code":-32603,"message":"failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error"} failureReason=null id=thread/resume:<ID> method=thread/resume pendingCountAfter=0 priority=critical queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=thread_hydration spanId=null timeoutMs=120000 traceId=null
11529: 2026-09-14T08:36:55.740Z error [electron-message-handler] Failed to resume conversation conversationId=<ID> errorMessage="failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" errorName=Error errorStack="Error: failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true
11531: 2026-09-14T08:36:55.804Z error [electron-message-handler] Request failed conversationId=none durationMs=65 error={"code":-32603,"message":"failed to list threads: thread-store internal error: state DB unavailable for filtered thread listing"} failureReason=null id=<ID> method=thread/list pendingCountAfter=0 priority=background queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=collab_hydration spanId=null timeoutMs=0 traceId=null
11532: 2026-09-14T08:36:56.499Z info [electron-message-handler] maybe_resume_started conversationId=<ID> documentVisibilityState=visible hostId=remote-ssh-discovered:<HOST> previousResumeState=needs_resume previousStreamRole=null rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true routePath=/index.html
11534: 2026-09-14T08:36:56.563Z error [electron-message-handler] Request failed conversationId=<ID> durationMs=63 error={"code":-32603,"message":"failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error"} failureReason=null id=<ID> method=thread/read pendingCountAfter=0 priority=critical queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=thread_hydration spanId=null timeoutMs=0 traceId=null
11535: 2026-09-14T08:36:56.564Z warning [electron-message-handler] Failed to read thread metadata before resume conversationId=<ID> errorMessage="failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" errorName=Error errorStack="Error: failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true
11543: 2026-09-14T08:36:56.842Z error [electron-message-handler] Request failed conversationId=<ID> durationMs=93 error={"code":-32603,"message":"failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error"} failureReason=null id=thread/resume:<ID> method=thread/resume pendingCountAfter=0 priority=critical queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=thread_hydration spanId=null timeoutMs=120000 traceId=null
11544: 2026-09-14T08:36:56.862Z error [electron-message-handler] Failed to resume conversation conversationId=<ID> errorMessage="failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" errorName=Error errorStack="Error: failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true
11546: 2026-09-14T08:36:56.924Z error [electron-message-handler] Request failed conversationId=none durationMs=62 error={"code":-32603,"message":"failed to list threads: thread-store internal error: state DB unavailable for filtered thread listing"} failureReason=null id=<ID> method=thread/list pendingCountAfter=0 priority=background queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=collab_hydration spanId=null timeoutMs=0 traceId=null
11547: 2026-09-14T08:36:57.617Z info [electron-message-handler] maybe_resume_started conversationId=<ID> documentVisibilityState=visible hostId=remote-ssh-discovered:<HOST> previousResumeState=needs_resume previousStreamRole=null rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true routePath=/index.html
11549: 2026-09-14T08:36:57.681Z error [electron-message-handler] Request failed conversationId=<ID> durationMs=64 error={"code":-32603,"message":"failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error"} failureReason=null id=<ID> method=thread/read pendingCountAfter=0 priority=critical queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=thread_hydration spanId=null timeoutMs=0 traceId=null
11550: 2026-09-14T08:36:57.681Z warning [electron-message-handler] Failed to read thread metadata before resume conversationId=<ID> errorMessage="failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" errorName=Error errorStack="Error: failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true
11558: 2026-09-14T08:36:57.955Z error [electron-message-handler] Request failed conversationId=<ID> durationMs=93 error={"code":-32603,"message":"failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error"} failureReason=null id=thread/resume:<ID> method=thread/resume pendingCountAfter=0 priority=critical queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=thread_hydration spanId=null timeoutMs=120000 traceId=null
11559: 2026-09-14T08:36:57.983Z error [electron-message-handler] Failed to resume conversation conversationId=<ID> errorMessage="failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" errorName=Error errorStack="Error: failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true
11561: 2026-09-14T08:36:58.042Z error [electron-message-handler] Request failed conversationId=none durationMs=66 error={"code":-32603,"message":"failed to list threads: thread-store internal error: state DB unavailable for filtered thread listing"} failureReason=null id=<ID> method=thread/list pendingCountAfter=0 priority=background queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=collab_hydration spanId=null timeoutMs=0 traceId=null
11571: 2026-09-14T08:36:58.738Z info [electron-message-handler] maybe_resume_started conversationId=<ID> documentVisibilityState=visible hostId=remote-ssh-discovered:<HOST> previousResumeState=needs_resume previousStreamRole=null rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true routePath=/index.html
11583: 2026-09-14T08:36:58.834Z error [electron-message-handler] Request failed conversationId=<ID> durationMs=96 error={"code":-32603,"message":"failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error"} failureReason=null id=<ID> method=thread/read pendingCountAfter=0 priority=critical queueWaitMs=0 rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true source=thread_hydration spanId=null timeoutMs=0 traceId=null
11584: 2026-09-14T08:36:58.835Z warning [electron-message-handler] Failed to read thread metadata before resume conversationId=<ID> errorMessage="failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" errorName=Error errorStack="Error: failed to read thread: thread-store internal error: failed to read thread metadata for <ID>: error returned from database: (code: 4874) disk I/O error" rendererWebContentsId=1 rendererWindowAppearance=primary rendererWindowFocused=false rendererWindowId=1 rendererWindowVisible=true

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 the logged maybe_resume_started sequence and the thread_hydration handling for thread/read and thread/resume on SSH remote connections. Reproduce or simulate the persistent database I/O failure, then trace why the conversation remains needs_resume and another attempt begins. Done means persistent failures reach a stable error state or bounded backoff with an explicit retry/reconnect action, with coverage for the recovery behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, rust
Domain
backend, databases, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.