Skip to content

Failed mid-run queue saves clear the composer and lose the follow-up #922

Closed

Description

@currentbits

Priority: P1. Reproduced/reviewed at commit 6c7a6fbe on 2026-09-05.

A follow-up typed during a working run disappears when threads.setQueued rejects, even though it was never saved.

Reproduction

  1. Mount App on a working thread.
  2. Make api.threads.setQueued reject, e.g. a disconnected bridge or rejected persistence request.
  3. Type a follow-up and click Send.
  4. The error is shown, but the composer is blank and no queued copy exists.

Confirmed with the real App/useCoder/Composer and a rejecting fakeCoder method.

Cause

The busy branch of useCoder.startRun catches the queue write error and returns normally. Composer.runAction interprets fulfilled onSend as success and clears the draft, attachments and paste cards. The idle start and /btw branches already rethrow, so the inconsistency is localized.

Acceptance

  • A failed queue write leaves the prompt and associated input intact and retryable.
  • Successful queueing clears the composer exactly once.
  • Show the failure without claiming that the prompt was queued.
  • Cover the entire App → useCoder → Composer path with a rejected setQueued call.

Source: src/useCoder.ts#L1467.

Requested disposition: separate Planboard issue, plan:todo. Scope is the concrete defect above.

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

    plan:doing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions