/fix
Fix the last review's open findings, or what you ask for, and push one commit to the pull request's branch. What it may change, and what it never touches.
/fix
/fix <what to change>Runs the project's Task automation. The model makes the smallest change that does what was asked and runs the repo's tests and lint. The action then runs the checks again itself and, when they pass, commits the change as axonshaft[bot] and pushes it to the pull request's branch.
- A bare
/fixasks for the open findings of the last review, from its summary comment. With no review yet, or nothing open, it replies with one line and starts no session. The run ends withnothing_to_fix. /fix <what to change>asks for what you wrote.- A request that only asks a question gets an answer, and nothing is committed.
Who and where
- Someone with write access to the repo.
- Only in the pull request's Conversation tab. GitHub runs a comment in a review from the pull request's merge commit, so the API refuses a change from it and replies on that thread with the reason and where to comment instead.
- Only on a GitHub-hosted Linux runner, such as
ubuntu-latest. See What it needs.
On auto, it runs on opus at high effort.
The reply
The reply goes where the request was made. It says what changed, then lists the changed files, the commit (a link in a real reply) and each check with Passed or Failed. The sample below is an illustration of the shape, not a real run, and leaves out the footer line:
Added the missing
awaitbeforesaveDraftinsrc/editor/autosave.ts, so a failed save now reaches the error toast, and added a test for it.Changed:
src/editor/autosave.ts,src/editor/__tests__/autosave.test.tsCommit:
4f2c9e1onfix-autosave
Check Result bun install --frozen-lockfilePassed bun run testPassed bun run lintPassed
When the change touches a package.json, a Makefile or a lockfile, the reply adds a "Read before merging" line naming them, because they decide what runs on install and in CI. When a check fails, nothing is pushed, and the reply names the check and shows the end of its output.
The push starts the repo's own CI before anyone has read the change, and CI runs the changed code with whatever secrets its workflows get. Read the commit before you merge or deploy it, and keep secrets out of the workflows that run on pull requests.
What it may change
- Files inside the checkout: read, edit and create them.
- It commits the files the session changed, with each file's executable bit, links kept as links, and deleted files removed.
What it never changes
The whole change is refused with push_failed when it has any of these:
.githubor anything under it, in any case, since workflows run with the repo's secrets;.gitor anything under it, or a path outside the checkout;- more than 200 files, a file over 1 MB, or more than 10 MB in all;
- something that isn't a file or a link, such as a submodule.
Where it pushes
The project's push mode decides, and the action checks it before the session starts:
| Push mode | What it allows |
|---|---|
| Disabled | Nothing is pushed. |
| Restricted (default) | Only the pull request's own branch, and never a fork's. |
| Enabled | Any branch but the default one. A run still pushes only to the pull request's branch. |
Nothing is ever pushed to the default branch, or with --force. When the push can't happen, because push mode is Disabled, the pull request is from a fork, or its branch is the default branch, the session doesn't run and the run ends with push_failed. When someone pushes to the branch during the run, GitHub refuses the push, and the run fails with push_failed.
What the model can run
git diff,git log,git showandgit status.- The install for the lockfile, such as
bun install --frozen-lockfileornpm ci, exactly as written. - The
package.jsonscripts andmaketargets namedtest,lint,check,typecheck,types,tsc,build,formatorfmt, or starting with one of those and:,-,_or., with more words allowed after them. cargo test,check,clippy,fmtandbuildwhen there's aCargo.toml, andgo test,vetandbuildwhen there's ago.mod.
Anything else is refused: git commit, git push, gh, installing a package by name, and shell operators. Every command runs in the foreground, inside a sandbox. What runs in CI describes it.
What it needs
- A GitHub-hosted runner. On a self-hosted runner the session doesn't run:
self_hosted_unsupported. persist-credentials: falseonactions/checkout. A checkout that kept a token doesn't run:credentials_in_checkout.- Linux, with bubblewrap 0.6 or later. The action installs it from the runner's Ubuntu archive when it's missing. When the sandbox can't start:
sandbox_unavailable. - The app's Contents (write) permission on the installation.
Last updated on