Skip to content

bug(desktop): failed local message blocks later sends until removed #5007

Closed

Description

@me2seeks

What happened

A definitively failed Desktop local message prevents later messages in the same Session from reaching the Host. Removing the failed local copy immediately lets the next message send. Users must discard the earlier text to make progress even when the Host is available.

Expected: retain the failed message for inspection/removal, but allow subsequent messages to send without requiring deletion. Messages with an unknown Host outcome must still preserve ordering until reconciled.

How to reproduce

Deterministic service experiment using the production DesktopSessionLocalService, real SQLite DesktopSessionLocalStore, and the actual session-local:cancel IPC handler:

  1. Enqueue message A. Have the submit boundary reject it with RuntimeHostOperationError('turn.message.submit', 'session_busy', ...); wait for A to become failed.
  2. Make the submit boundary accept subsequent requests. Enqueue B in the same Session and C in another Session, then wake delivery.
  3. C becomes accepted; B stays saved and never reaches the submit boundary, including after ten further wake cycles.
  4. Remove A via session-local:cancel. B immediately reaches the submit boundary and becomes accepted.

This injects the initial refusal; it does not establish why the first message failed in the original UI report. The original observation followed Stop → send → send again. Separate real Host coordinator tests accepted both send-after-stop and concurrent stop/send, so the Stop-to-first-refusal trigger remains unconfirmed.

Environment

  • Source reproduction: 5a1514c1d43894691186174cc0683e0b6fd88f53; the same queue logic is present on current main 93a8dd785.
  • OS: Linux x64
  • Surface: Desktop main-process local delivery service
  • Node: v26.3.0
  • Host submission response simulated; no real model required for the queue reproduction.

Logs, screenshots, or additional context

Before removal: A=failed, B=saved, C=accepted
Submit calls: A, C
After removing A: B=accepted, C=accepted
Submit calls: A, C, B

wake() adds the Session to blockedSessions before skipping a failed record. Consequently a terminal local failure continues to reserve the Session's delivery position. The fix belongs in Desktop local delivery scheduling; Host admission and unknown-outcome reconciliation remain authoritative.

Broader delivery wording and recovery affordances are separate UX follow-up work.

Prepared with OpenAI Codex on behalf of @me2seeks.

Activity

  1. added
    bug
    on Sep 8, 2026
  2. me2seeks commented on Sep 8, 2026

    @me2seeks
    ContributorAuthor

    take

  3. added a commit that references this issue on Sep 8, 2026
    8779737
  4. added a commit that references this issue on Sep 9, 2026
    167c52d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions