Skip to content

Commit 75798b6

Browse files
committed
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.
1 parent b50c571 commit 75798b6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/claude-code.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010
claude-code:
1111
uses: pytorch/test-infra/.github/workflows/_claude-code.yml@main
1212
with:
13-
additional_claude_args: --allowedTools Skill ${{ startsWith(github.event.comment.body, '@claude /pr-review') && '--effort max' || '' }}
13+
# No other effort level is recognized. The issue body is read only on issue
14+
# events, because on a comment it holds the issue or PR description.
15+
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' || '' }}
1416
append_system_prompt: |
1517
When asked to review a PR, always use the /pr-review skill first.
1618
Put the detailed review inside a GitHub collapsible section and a

0 commit comments

Comments
 (0)