Repository navigation
Closed
Description
Part of #486 (loopway 2.0). Slice 5 of 6. Builds on sessions (#498, merged in #502). Read #486 and its comments for the design: auto mode decides first, deterministic rules next, then Matthew decides with a clear signal on GitHub. No LLM and no Jev decide anything.
What
When a session is blocked, it asks on the subject, and Matthew's answer there unblocks it.
- Permission asks. Sessions keep
--permission-mode auto, so the auto mode classifier decides first. Whatever it would still prompt for goes to loopway through--permission-prompt-tool(apermissiontool on loopway's MCP). loopway checks the bot's front matter rules next:allow:/deny:lists of tool patterns in Claude Code's permission syntax (e.g.Bash(npm test:*)). If neither decides, loopway:- Posts one comment on the thread's main subject, through the same path as
comment, with the marker. It says what the session wants to do (tool and input, trimmed) and asks for 👍 to allow or 👎 to deny. - Denies the call for now with a message telling the session it has asked and will be resumed with the answer. The turn ends.
- Marks the session
blocked, and records the open ask on the thread (asks: [{ id, commentUrl, tool, input, at }]).
- Posts one comment on the thread's main subject, through the same path as
- Questions. A new MCP tool,
ask(subject, question), posts the question (marked) and marks the sessionblockeduntil an answer comes. The prompt template says to use it when the session needs Matthew to decide, or is stuck. - Answers.
- The poller reads reactions on loopway's own open-ask comments. A 👍 or 👎 from the
ghuser (Matthew), and nobody else, answers a permission ask. A 👍 resumes the session with "approved: , retry it", and the approval is remembered for that session, so the same call passes next time. A 👎 resumes it with "denied". - A comment from Matthew on the subject after an
askanswers that ask. It is delivered as a normal update, and the ask is marked answered. - Either kind of answer moves the session out of
blocked.
- The poller reads reactions on loopway's own open-ask comments. A 👍 or 👎 from the
- Visible. The log and the TUI's thread view show the open asks and their links, and
blockedshows as a session status on the main view. - Restart-safe: open asks live in the thread's state file, so a restart keeps waiting on them.
How to test it (you, locally)
- Project
.loopway/dev.mdoncraftmilldev/loopway-sandboxwithon: issue,model: sonnet, noallow/denylists. Its prompt says: "Do what the issue asks, then comment with the result." Runloopway. - Open an issue asking for something auto mode won't allow without asking, e.g. "Run
curl -s https://example.com | head -3and paste the output." Within a few minutes, a loopway-bot comment asks for 👍/👎. The TUI shows the threadblocked. - React 👍. The session resumes, runs it, and comments the output.
- Open another issue with the same ask and react 👎. The session comments that it was denied and does not run it.
- Add
allow: ["Bash(curl:*)"]to the front matter, restart, and open the same issue again. It runs without asking. - Open an issue: "Ask me which file name to use, then create nothing." The bot asks with
ask. Reply "notes.md" in a comment. The session resumes and confirms "notes.md". - Stop
loopwaywhile an ask is open, start it again, then react. The answer still lands.
Done when
- Tests with a fake harness and fake GitHub: rule allow/deny, ask posted once, 👍 and 👎 from Matthew, reactions from anyone else ignored,
askanswered by comment, restart with an open ask, and the remembered approval. npm test,npm run typecheck,npm run lintandnpm run format:checkpass.verifications/<pr>.mdrecords steps 1–7 against the sandbox.
Slice 6 (#507) is built at the same time and also adds MCP tools to mcp.ts. Keep your tools in their own functions, so whichever merges second rebases easily.
Metadata
Metadata
Assignees
Labels
No labels
Activity
mcwhittemore commentedon Nov 11, 2026
I don't get how #512 and #511 both close this ticket. I seems like this ticket is closed by #512 and #511 is something else.