# /autofix-pr Command

> It watches your pull request and pushes fixes for you.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** /autofix-pr, Autofix pull request

## Think of it like

It is like a helper who stays by your stand. They fix each thing a buyer points at.

## Definition

/autofix-pr starts a cloud session that watches the pull request for the branch you have checked out. When a CI check fails or a reviewer leaves a comment, it pushes a fix. By default it tries to fix every failure and comment. Pass a prompt to narrow that, such as only lint errors. It needs the gh command line tool and access to cloud sessions.

## Example

Lucy opens a pull request at the end of the day and runs /autofix-pr. In the night a test fails, and a reviewer asks for a rename. By morning both fixes are pushed.

## Example code

```console
/autofix-pr only fix lint and type errors
```

Watch the pull request and fix only small errors.

## Why it matters

A pull request does not wait on you for each small fix, so it is ready to merge sooner.

## Common mistake

Running it on one branch to watch another pull request. It watches the pull request of the branch you have checked out.

## Three principles

- **Watches the pull request.** From the cloud.
- **Fixes and pushes.** Failures and comments.
- **A prompt narrows it.** Pick what to fix.

## Related terms

- [Cloud Session](https://learn.benibix.com/term/ai/cloud-session)
- [Claude Code GitHub Actions](https://learn.benibix.com/term/ai/claude-code-github-actions)
- [Continuous Integration (CI)](https://learn.benibix.com/term/development/continuous-integration)
- [Pull Request](https://learn.benibix.com/term/development/pull-request)

## Taught in

- [Diff and Code Review](https://learn.benibix.com/learn/ai-claude-code-commands/diff-and-code-review): Claude Code Commands, 8/17

![A cloud session watches a pull request. When a check fails or a reviewer comments, it pushes a fix, and the checks run again.](https://learn.benibix.com/diagrams/cmd-autofix.svg)

---

Source: https://learn.benibix.com/term/ai/autofix-pr-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
