Tutorials

How to Automatically Watch and Fix GitHub PR Failures with Qwen Code 0.29

Qwen Code 0.29 introduces scheduled PR monitoring in the current Git checkout. Learn how to watch CI failures, process review feedback, and approve fixes without repeatedly running commands.

You push a commit, open a pull request, and return to whatever you were working on before. A few minutes later, GitHub reports a failed check.

Perhaps a test failed. Perhaps a reviewer noticed something that needs changing. Either way, someone has to notice the event before anything happens.

Qwen Code already provided /autofix-pr for handling these situations. However, developers who wanted the agent to work inside their current Git checkout had to invoke the command manually for each round of fixes.

On November 28, 2026, Qwen Code released 0.29.0, introducing scheduled monitoring for its --in-place mode.

The agent can now keep checking a pull request while you continue working. When it discovers something that requires attention, it presents the findings and asks whether it should proceed.

1. Install Qwen Code 0.29.0

Install the version containing the new feature:

npm install -g @qwen-code/[email protected]

Check the installed version:

qwen --version

The PR monitoring functionality also requires GitHub CLI (gh).

If you already have it installed, verify your authentication:

gh auth status

Otherwise, install it from the GitHub CLI website and authenticate:

gh auth login

Your GitHub account must have permission to push to the pull request’s branch.

Open the repository containing your application and check its current state:

git status
git branch --show-current
gh pr view

For in-place monitoring, the current branch must correspond to the PR’s head branch. Starting from a clean working directory also avoids conflicts between your local changes and the agent’s work.

Now launch Qwen Code:

qwen

The /autofix-pr commands shown below belong inside the interactive Qwen Code session, rather than your ordinary terminal.

2. Start watching a pull request

Suppose your repository has an open pull request numbered 123.

To monitor it using the current checkout, enter:

/autofix-pr 123 --in-place --watch

The command asks for confirmation before establishing the watch.

Once accepted, it runs an initial attended round and schedules subsequent checks at two-minute intervals.

You can change that interval:

/autofix-pr 123 --in-place --every 5

Here, --every 5 means checking every five minutes. It also implicitly enables --watch, so specifying both flags is unnecessary.

The supported intervals are 1, 2, 5, 10, 15, 30, and 60 minutes.

If the current branch already belongs to an open pull request, you can omit its number:

/autofix-pr --in-place --watch

Qwen Code uses GitHub CLI to identify the corresponding PR.

3. What happens when CI fails?

A scheduled task checks the pull request through a lightweight gate.

This detail is particularly interesting: the gate runs outside the AI model. If nothing relevant has changed, there is no reason to start another model turn.

When a new failure or relevant review comment appears, Qwen Code examines the situation and presents a proposal.

The following illustrates the general process:

flowchart TD
    A["Scheduled PR check"] --> B{"New relevant event?"}
    B -->|No| C["Wait for next check"]
    C --> A
    B -->|Yes| D["Inspect CI and review feedback"]
    D --> E{"Developer decision"}
    E -->|Fix it| F["Apply and verify fixes"]
    F --> G["Commit and push if successful"]
    G --> A
    E -->|Not now| H["Keep unresolved items pending"]
    H --> A
    E -->|Stop watching| I["End scheduled watch"]

For example, a proposal might report two failed checks and one trusted review thread.

You are then presented with three choices:

Option Behavior
Fix it Begin an attended round of fixes
Not now Leave the issues unresolved and continue monitoring
Stop watching End the scheduled watch

Selecting Fix it authorizes the round. The agent investigates failures, modifies the relevant code, and runs the repository’s verification commands under the session’s approval mode.

If verification succeeds, the workflow can commit and push the changes to the PR branch.

It can also reply to review comments describing what was changed.

If you prefer to keep those discussions manual, start the watch with:

/autofix-pr 123 --in-place --watch --no-reply

This allows fixes to be pushed without posting replies on the pull request.

4. Why Not now does not keep interrupting you

Imagine that CI fails while you are working on another part of the application.

You choose Not now.

Would it be useful if the agent presented exactly the same question two minutes later? Probably not, especially when the same failure remains unresolved for an hour.

Qwen Code handles this using two separate pieces of stored information.

The gate remembers which events have already been reported. The watch state remembers which events have actually been handled.

Consequently, declining a proposal does not mark its problems as resolved. It merely prevents the unchanged events from repeatedly triggering another proposal.

When a new relevant PR event arrives, previously deferred problems can appear alongside it.

You can also request a manual round without waiting for another event:

/autofix-pr 123 --in-place

The existing scheduled watch is preserved when the manual round uses that same in-place watch.

This separation between reported and handled events avoids losing unresolved work while preventing repeated interruptions.

5. In-place monitoring versus worktree monitoring

Scheduled PR monitoring itself is not new to Qwen Code.

The existing implementation already supported watching pull requests from a separate Git worktree.

Without --in-place, the command uses that isolated working directory:

/autofix-pr 123

The new release brings scheduled monitoring into the developer’s own checkout.

Behavior Worktree mode In-place watch
Working directory Separate worktree Current checkout
Scheduled monitoring Yes Yes
Per-round approval before fixes No Yes
Background fix agent Supported under appropriate permissions No
Reuses current installed dependencies Not directly guaranteed Yes, if already installed
Automatic discarding of local edits Possible in its dedicated worktree Not permitted

Working inside the current checkout introduces a complication: the agent and the developer may both be modifying the same files.

For that reason, scheduled in-place fixes require explicit approval and run in the foreground.

A dirty or diverged checkout stops the round for a human decision rather than automatically discarding changes.

There is a distinction, however, between editing code to fix a problem and synchronizing the checkout. A clean, fast-forwardable checkout may adopt existing remote commits before the fix proposal appears.

The approval requirement should therefore not be interpreted as a guarantee that the local checkout will never change before a repair is approved.

6. Check, resume, or stop a watch

To inspect existing watches:

/autofix-pr status

Or inspect a particular PR:

/autofix-pr status 123

The status command reads locally stored watch information, including recent checks, the known PR head, and issues awaiting a human decision.

It does not perform a fresh GitHub query.

If a terminal session ends, its scheduled watch stops running. The recorded state remains available, allowing you to resume it later:

/autofix-pr resume 123

Resuming preserves the previous interval, instructions, history, and remaining push budget.

To stop monitoring explicitly:

/autofix-pr stop 123

In in-place mode, stopping removes the watch without deleting your checkout or branch.

Daemon sessions behave somewhat differently. When using Qwen Code through its daemon and Web Shell, the scheduled task is bound to the conversation and can survive a daemon restart. Permissions may need to be confirmed again afterward.

Recurring watches expire after seven days by default.

A merged or closed pull request also ends its watch.

7. Restrictions to keep in mind

The following command combinations are invalid:

/autofix-pr 123 --once --watch
/autofix-pr 123 --once --every 5

A one-shot operation cannot simultaneously establish a recurring schedule.

There is also no unattended scheduled in-place mode. Adding --yes does not remove the initial confirmation or the requirement to approve subsequent repair rounds.

Another restriction concerns pull requests whose authors cannot push to the repository. Qwen Code does not permit continuous monitoring of those PRs, because verifying changes could execute someone else’s code with your credentials within reach.

The command also distinguishes trusted review feedback from arbitrary comments. A comment on a public PR is not automatically an instruction the agent is allowed to follow.

Nevertheless, an approved fix can run project commands and push commits. Review the resulting changes, particularly when they involve dependencies, authentication, deployment configuration, or CI itself.

Qwen Code does not approve or merge the pull request on your behalf.

What changed in Qwen Code 0.29?

Before this release, developers who preferred working in their own checkout had to notice PR failures themselves and manually invoke another round.

The new watch mode moves the detection of those failures into a scheduled process without making the repair process fully autonomous.

That distinction is what makes the feature useful.

Checking whether a pull request needs attention is repetitive work. Deciding whether a proposed change is appropriate requires considerably more context.

With --in-place --watch, Qwen Code can handle the former while leaving the decision to begin each scheduled repair with the developer.

External Sources used for this article

Related Articles

View all →