Skip to content

ask: rules in bot front matter, since auto mode rarely asks #517

Done

Description

@mcwhittemore

Follow-up from #486, drafted for review. Nothing has been started on it.

Problem

#512 sends permission prompts to GitHub for a 👍/👎, but auto mode almost never prompts. In the live run, it allowed curl, writes outside the project and WebFetch. Nothing reached the ask path until a .claude/settings.json with permissions.ask was added by hand.

Proposal (default)

  • An ask: list in a bot's front matter, beside allow: and deny:, in Claude Code's permission syntax (e.g. Bash(git push:*), Bash(curl:*), WebFetch).
  • loopway passes the list to the session as ask rules (through --settings or a generated settings file, whichever Claude Code supports). A matching call always goes to the 👍/👎 comment, even when auto mode would allow it.
  • Order of precedence: deny beats ask, and ask beats allow and auto mode.
  • init-scratch writes a commented-out example.

How to test it (you, locally)

  1. Add ask: ["Bash(curl:*)"] to scratch/.loopway/dev.md and run loopway.
  2. Open an issue: "Run curl -s https://example.com | head -3 and paste the output."
  3. A 👍/👎 comment appears even though auto mode would allow curl. 👍 runs it.
  4. Remove the ask: line, restart, open the same issue: it runs without asking.

Done when

  • Tests that the ask rules reach the fake claude's args or settings, plus the order of precedence.
  • verifications/<pr>.md records steps 1–4 in the sandbox.

Activity

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

    @mcwhittemore
    CollaboratorAuthor

    Why isn't this moving?

  3. loopway-bot commented on Nov 25, 2026

    @loopway-bot
    Contributor

    PR: #557 (merged with main, now 2.1.1). Record: verifications/557.md on the branch.

    Bottom line: the live run shows the main behaviour. With ask: ["Bash(curl:*)"] in dev.md, a curl that auto mode would have allowed went to a 👍/👎 comment on the sandbox issue (#54, comment 6921493731). Not checked: the 👍 and the run after it, and step 4 (no ask:, runs without asking).

    • The permission check refused me the 👍, since it would be me approving my own request, and I did not work around it.
    • The loopway I had running then started failing on GitHub with 401, so I couldn't restart it for step 4.
    • I didn't run the no-ask: case, so the record doesn't show that auto mode would have allowed curl by itself.

    Checks pass after the merge: 276 CLI and 41 web tests, plus typecheck, lint and format. Sandbox #54 is closed and npm run sandbox -- list 557 shows nothing open.

    To finish: someone reacts 👍 on a fresh ask as loopway-bot, or tells me another way to approve it. Then steps 3 and 4 can be rerun, and I can add them to the record.

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