Repository navigation
Closed
Description
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
- 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 andsession.status = "blocked". - The owner answered in chat. But only an owner comment on the same subject, after the ask, answers a question (
answerQuestionsinpackages/cli/src/threads.ts). Chat never touches asks, so the ask stayed open. - In
ready()(packages/cli/src/sessions.ts), an inbox with chat in it starts a run even while the thread is blocked. Queued updates needstatus !== "blocked", and while a chat block is activedeliver()sends an empty batch. So every run was chat-only. - 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, 16edited, 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
- A chat message answers open questions. When the owner sends a chat message to a blocked thread, its open
questionasks are marked answered (how: "chatted", with anansweredevent) and the session is unblocked. Permission asks are unchanged: they still need a 👍 or 👎. - 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.
- Make a blocked thread obvious.
loopway threads,--jsonand 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. - Thin the batch (lowest priority, can be its own PR). When a run takes the queue, keep only the latest
check_runper check name and subject, and collapse repeatededitedevents 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 aquestionask is unblocked by a chat message. The ask getsansweredAtand anansweredevent withhow: "chatted", and the next run delivers the whole queue.- A chat message doesn't answer a
permissionask: 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: theloopway threadsrow and--jsonshow the block (kind, subject, URL) for a blocked thread, and nothing extra for an idle one.- For 4: a batch with three
check_runupdates fortest(in_progress, completed, completed) and twoeditedupdates 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:
- Open an issue
[#<this PR>] blocked threadwith no "How to test it" section, and assign it to yourself so dev picks it up. Wait for dev toaska question on it.loopway threadsshows the thread as blocked on that question, with its URL. - 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.
- 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. - 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.
- 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.
Metadata
Metadata
Assignees
Labels
No labels
Activity
loopway-bot commentedon Nov 16, 2026
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,--jsonand 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
devbot in this repo does not readcraftmilldev/loopway-sandbox, socreate_issuerefused to open the sandbox issue, and I won't useghfor that. So the real-claude run, the real TUI chat and the PR-comment answer are all unchecked;verifications/552.mdon 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?