Skip to content

create-pr opens and updates PRs without the classifier, and no other gh api call skips it #303

Open

Description

@ooloth

Current state

When an agent in auto mode opens or updates a PR through create-pr, the post goes to the auto-mode classifier, which can block it even after I approved it by answering a numbered question, as use-gh describes. create-pr posts with gh api repos/<owner>/<repo>/pulls --input <dir>/pr.json and gh api -X PATCH repos/<owner>/<repo>/pulls/<n> --input <dir>/pr.json, and no allow rule in tools/claude/config/settings.json matches either. An allow rule written on those commands can't be narrowed to them: Claude Code's permissions docs say a * in a Bash rule "matches any text, including spaces" and that only the text before the first * limits the rule. So Bash(gh api repos/*/pulls --input *) would approve any gh api call containing /pulls --input , such as gh api repos/o/r/git/refs/heads/main -X DELETE -f a=/pulls --input f. The one rule of that shape, Bash(gh api repos/recursionpharma/*/pulls/*/comments*), was removed for this reason. The reply_to_comment.py rule has a safe shape: its * comes after a script's path, and the script checks its own arguments.

Ideal state

  • create-pr opens a draft PR, and updates an open PR's title and body, in auto mode with no classifier check and no prompt
  • A command that is not one of those two posts, including one that contains the same text with another endpoint, method or fields, still goes to the classifier

Decisions

Constraints

Open

No open decisions.

Starting points

  • tools/agents/config/skills/create-pr/SKILL.md: step 6 builds pr.json and makes both posts
  • tools/claude/config/settings.json: the allow rules, including the reply_to_comment.py one
  • tools/agents/config/skills/review-pr-comments-converge/scripts/reply_to_comment.py: a posting script whose allow rule is scoped to its path

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions