t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: First message can disappear when a new thread starts

Open D3OXY opened this issue 4 months ago • 0 comments

Area

apps/server

Steps to reproduce

  1. Create a new thread and immediately send its first message.
  2. Let the thread transition from its draft route while the initial thread-detail snapshot loads.
  3. Observe the assistant response begin streaming.
  4. Reopen or restart the app.

The race is timing-dependent.

Expected behavior

The first user message remains visible before the assistant response.

Actual behavior

The initial snapshot can be delivered before the live thread-event subscription attaches. A first-message event published in that gap is omitted from client state. Later assistant events advance and persist the client cache cursor, so restarting can preserve the missing message.

Server persistence still contains the user message. Removing the affected IndexedDB thread cache entry forces a fresh snapshot and restores it.

Impact

Minor bug or occasional failure. It makes conversation history appear incomplete and requires manual cache invalidation to recover.

Version or commit

main @ fdca15471

Environment

macOS desktop app with Codex provider

Investigation

Searched existing issues; no duplicate found. The no-cursor orchestration.subscribeThread path returns a snapshot and only then consumes the live stream, unlike the replay path which buffers live events before catch-up.

D3OXY avatar Jul 17 '26 08:07 D3OXY