Skip to content

A question answered in chat leaves the thread blocked, and its queue never goes out #549

Closed

Description

@mcwhittemore

A thread that asks a question and then gets its answer in chat stays blocked, and its queue never goes out. Thread 24edcfc4 (dev, #543 and #548) had 84 updates pending for about 3 hours while the chat kept working.

What happened

  1. 03:26 UTC: the dev bot's first run on more polish on the annimation #543 called ask ("…You said instructions will come as chat in loopway, so I can start from your first message there"). The thread got an open ask and session.status = "blocked".
  2. The owner answered in chat. But only an owner comment on the same subject, after the ask, answers a question (answerQuestions in packages/cli/src/threads.ts). Chat never touches asks, so the ask stayed open.
  3. In ready() (packages/cli/src/sessions.ts), an inbox with chat in it starts a run even while the thread is blocked. Queued updates need status !== "blocked", and while a chat block is active deliver() sends an empty batch. So every run was chat-only.
  4. 04:13: the thread opened More polish on the homepage animation (draft) #548. Everything on More polish on the homepage animation (draft) #548 then queued and stayed there: 44 check_run, 18 review-bot comments, 16 edited, 2 owner comments ("resolve conflicts", "Resolve all the feedback…"), and the draft/ready/assign/label events. The owner's comments on More polish on the homepage animation (draft) #548 didn't unblock it either, because the question was asked on more polish on the annimation #543.

What to change

  1. A chat message answers open questions. When the owner sends a chat message to a blocked thread, its open question asks are marked answered (how: "chatted", with an answered event) and the session is unblocked. Permission asks are unchanged: they still need a 👍 or 👎.
  2. Answer a question from any of the thread's subjects. An owner comment on any open subject of the thread, after the ask, answers that thread's open questions. A comment on the PR the thread opened answers a question asked on its issue.
  3. Make a blocked thread obvious. loopway threads, --json and the TUI (main list and thread view) say the thread is blocked and on what, e.g. blocked: question on craftmilldev/loopway#543 <url>, next to the pending count. The thread view's Pending section says the updates are waiting on that answer.
  4. Thin the batch (lowest priority, can be its own PR). When a run takes the queue, keep only the latest check_run per check name and subject, and collapse repeated edited events on a subject into one. The queue on disk keeps everything, and the session's message says how many were collapsed.

1–3 can ship as one PR. Each change to packages/cli raises its version.

How to test it

Unit tests, with no network (fake source and test/fake-claude.mjs):

  • threads/sessions: a thread blocked on a question ask is unblocked by a chat message. The ask gets answeredAt and an answered event with how: "chatted", and the next run delivers the whole queue.
  • A chat message doesn't answer a permission ask: the thread stays blocked after the chat run, and the queue is still there.
  • An owner comment on subject B answers a question asked on subject A of the same thread. A comment from someone else, or one older than the ask, doesn't.
  • format: the loopway threads row and --json show the block (kind, subject, URL) for a blocked thread, and nothing extra for an idle one.
  • For 4: a batch with three check_run updates for test (in_progress, completed, completed) and two edited updates sends one of each, the latest. The queue on disk is cleared the same way it is today.

Live, in craftmilldev/loopway-sandbox, from npm run init-scratch -- --reset, with the built CLI:

  1. Open an issue [#<this PR>] blocked thread with no "How to test it" section, and assign it to yourself so dev picks it up. Wait for dev to ask a question on it. loopway threads shows the thread as blocked on that question, with its URL.
  2. While it's blocked, comment on the issue from another account, or let the review bot add updates. The pending count goes up and the row still says blocked.
  3. Open the thread in the TUI and chat an answer. The log shows the question answered by chat. After the chat block ends, the next run says -> delivered N updates, and the pending count goes to 0.
  4. Again: get dev to ask on the issue and open a PR on the same thread. Comment an answer as the owner on the PR. The thread unblocks and the queue goes out.
  5. Close everything you opened in the sandbox and delete any branches you pushed. Record the run in verifications/<this PR>.md.

Done when

  • Answering a bot's question in chat, or on any of its thread's subjects, unblocks the thread and its queue goes out on the next run.
  • A blocked thread says so, and says on what, everywhere its pending count shows.
  • (If 4 ships) a run never gets more than one update per check, or more than one edited, per subject.

Activity

  1. self-assigned this
    on Nov 16, 2026
  2. loopway-bot commented on Nov 16, 2026

    @loopway-bot
    Contributor

    Opened #552 for items 1–3 (chat answers open questions; an owner comment on any open subject of the thread answers them; a blocked thread says what it waits on in loopway threads, --json and the TUI). Item 4 (thinning the batch) is not in it.

    Build, 220 cli tests (6 new or changed), typecheck, lint and format all pass, and the new tests cover each "Done when" line for 1–3.

    I could not run the live steps. The dev bot in this repo does not read craftmilldev/loopway-sandbox, so create_issue refused to open the sandbox issue, and I won't use gh for that. So the real-claude run, the real TUI chat and the PR-comment answer are all unchecked; verifications/552.md on the branch says so. If you want them run, either add the sandbox to the bot's repos for this thread or run steps 1–4 yourself. Do you want item 4 as its own PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions