From 75798b6fffa46cbf478cd3fd79059adb4322fae4 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Wed, 28 Oct 2026 23:22:42 -0700 Subject: [PATCH] Let "effort=max" in an @claude comment or new issue opt into max effort Claude runs at max effort only when a comment starts with "@claude /pr-review". Every other request, such as a question, an investigation or a code change, runs at the default effort, and there is no way to ask for more. Now a comment that contains "effort=max", or a new issue whose body contains it, also runs at max effort, as in pytorch/pytorch. For reviews this adds nothing new: every review request already goes through the /pr-review skill, so "@claude review effort=max" runs the same as "@claude /pr-review". The new effect is on requests that are not reviews. The issue body is read only on issue events. On a comment it holds the issue or PR description, so a description that mentions effort=max would otherwise raise every comment there to max effort. Max effort stays opt-in because it is slow. In recent runs on this repository, max effort reviews took 14 to 58 minutes, against 4 to 8 at the default. The job is stopped after one hour, when its credentials expire, and a run stopped there loses any answer it has not posted yet. --- .github/workflows/claude-code.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/claude-code.yml b/.github/workflows/claude-code.yml index b3c6bc40fab..b5f8bb844f0 100644 --- a/.github/workflows/claude-code.yml +++ b/.github/workflows/claude-code.yml @@ -10,7 +10,9 @@ jobs: claude-code: uses: pytorch/test-infra/.github/workflows/_claude-code.yml@main with: - additional_claude_args: --allowedTools Skill ${{ startsWith(github.event.comment.body, '@claude /pr-review') && '--effort max' || '' }} + # No other effort level is recognized. The issue body is read only on issue + # events, because on a comment it holds the issue or PR description. + additional_claude_args: --allowedTools Skill ${{ (startsWith(github.event.comment.body, '@claude /pr-review') || contains(github.event.comment.body, 'effort=max') || (github.event_name == 'issues' && contains(github.event.issue.body, 'effort=max'))) && '--effort max' || '' }} append_system_prompt: | When asked to review a PR, always use the /pr-review skill first. Put the detailed review inside a GitHub collapsible section and a