Skip to content

fix: remote session discovery gating and empty replay on remote open (0.3.1) - #51

Merged
william0wang merged 3 commits into
mainfrom
fix/remote-session-discovery
Aug 17, 2026
Merged

fix: remote session discovery gating and empty replay on remote open (0.3.1)#51
william0wang merged 3 commits into
mainfrom
fix/remote-session-discovery

Conversation

@william0wang

Copy link
Copy Markdown
Owner

Summary

Two remote-access fixes found while debugging live hub state, plus the 0.3.1 release bump.

Fix 1 — discovery no longer lists never-used sessions (cd1b58c)

Root cause: an editor restart auto-resumes its stored session/new placeholder, which materializes an empty backend session. The bridge pushed every registered session to the hub, so remote clients listed (and opened) conversations that never happened.

Fix: session summaries carry a hasActivity flag, set only by real interaction — a completed prompt turn (any outcome), a session/load with replayable history, or an adopted stored title. sessionsPayload filters on it. The hub replaces the session list on every register, so entries appear/disappear within one heartbeat (~10s).

Fix 2 — old conversations opened empty on remote clients (40b7209)

Root cause: the backend subprocess only answers session/messages for sessions it has loaded via session/create/session/resume. The bridge's alreadyLive check trusted the in-memory id mapping, which can exist without the session ever being loaded into the current backend (re-registered from the durable store, or left behind by a failed resume) — so session/load skipped the resume RPC and replayed nothing. fetchMessages also swallowed session/messages errors as empty, masking it. Verified live: the affected session returned totalMessages: 0 by ACP id but 352 messages / 52 turns after a forced resume — data intact, purely a bridge-side skip.

Fix: explicit backendLoadedSessions tracking — stamped only after a successful create/resume RPC; resolveResumeTarget skips the resume RPC only for verified sessions, otherwise re-issues it. fetchMessages now warns on errors instead of silently replaying empty.

Testing

  • 578 tests pass, typecheck/lint/build clean
  • New coverage: discovery payload gating (register-only vs marked vs titled), never-used placeholder stays hidden, load-with-history becomes discoverable, resume re-issue for never-loaded mappings, resume skip for verified-loaded sessions, placeholder materialization stamps the session

Docs

REMOTE-CLIENTS (sessions list semantics), TROUBLESHOOTING (empty-conversation-on-remote section), CHANGELOG 0.3.1.

@william0wang
william0wang merged commit fecc9fc into main Aug 17, 2026
1 check passed
@william0wang
william0wang deleted the fix/remote-session-discovery branch August 17, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant