Skip to content

[Bug]: Opening a thread while disconnected loses its read watermark on reconnect #36558

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web (shared client runtime also used by mobile)

Steps to reproduce

  1. Load an environment with an unread thread cached in the sidebar.
  2. Lose the environment connection, then open that thread while the cached shell is still available.
  3. Restore the connection without generating a new thread update. The reconnect snapshot carries the same updatedAt.

Deterministic reproduction: mount createThreadVisitTracker on an unread shell, have its visit command return a failure while disconnected, then restore the command and publish the same shell. Run pnpm exec vp test run packages/client-runtime/src/state/threadVisits.test.ts with the regression case in the linked fix.

Expected behavior

The reconnect snapshot retries the failed visit and records the read watermark and pending open.

Actual behavior

The tracker consumes its deduplication watermark and pending open before the command succeeds. A disconnected command fails immediately rather than being queued. The unchanged reconnect snapshot is skipped, leaving the server read watermark stale until the thread changes or the tracker remounts.

Impact

Minor bug or occasional failure

Version or commit

Reproduced on pingdotgg/main at aecad62. Independently verified by Claude Opus 5.5 at 4c47315.

Environment

Shared web/mobile thread visit tracker; deterministic atom-registry reproduction on Linux. Found during the GPT 6.1 Sol bughunt and independently confirmed by Claude Opus 5.5. No browser or native-device reproduction claimed.

Logs or stack traces

The regression assertion expects the accepted retry to contain the original watermark and opened: true; main returns no accepted visits.

Workaround

Leave and reopen the thread, or wait for a new thread update.

Activity

  1. added
    vouch:trusted
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions