Repository navigation
Commit 51b5c73
authored
## What is wrong today
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.
## What this change does
A comment that contains `effort=max`, or a new issue whose body contains
it, now also runs at max effort, the same opt-in pytorch/pytorch uses:
```
@claude why does this test fail on Windows? # default effort
@claude why does this test fail on Windows? effort=max # max effort
```
What this does and does not change:
- **Reviews: nothing new.** Every review request already goes through
the `/pr-review` skill, so `@claude review effort=max` runs the same as
`@claude /pr-review`.
- **Other requests: the real change.** Questions, investigations and
code changes can now run at max effort. Their run time at max effort has
not been measured yet.
- **Matching.** `effort=max` counts anywhere in the comment, also in a
quoted reply. No other level, such as `effort=high`, is recognized. A
comment in the workflow file says this.
- **New issues.** 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
minutes 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.
## Tests
This workflow runs from the main branch for comment and issue events, so
no check on this pull request runs the new condition.
- `actionlint` 1.7.12 reports no problems in the workflow file.
- A Python copy of the condition, following GitHub's expression rules
(case-insensitive `contains` and `startsWith`, missing fields read as
empty strings), gives the expected effort for these sample events:
| Event | Comment | Issue or PR body | Effort |
|---|---|---|---|
| comment | `@claude review` | mentions `effort=max` | default |
| comment | `@claude review effort=max` | plain | max |
| comment | `@claude /pr-review` | plain | max |
| comment | `@claude why is this slow? effort=max` | plain | max |
| comment | `@claude explain` | empty | default |
| new issue | none | `@claude investigate this crash effort=max` | max |
| new issue | none | `@claude investigate this crash` | default |
- After merge: in the "Run Claude Code" step's log, `--effort max`
should appear in the Claude arguments for an `@claude ... effort=max`
comment and for a new issue whose body has `@claude ... effort=max`. It
should not appear for a plain `@claude` comment on this pull request,
whose description mentions `effort=max`.
1 parent ea0f88f commit 51b5c73
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
0 commit comments