The agent says it's done, the pull request opens, and a few minutes later a test job fails. What follows is usually the same small chore: open the job, scroll to the error, copy it, paste it into the task and explain which commit it ran on. In the Agents dashboard that's now one button.
From a red check to a fix
Open the task's Checks tab. Under Repository checks, when one or more checks on the pull request have failed, you'll see Fix failing checks. Press it and the request goes into the task's conversation, so you can follow it like any other message. The agent gets the name and summary of each failed check and, for GitHub Actions jobs, the end of the failed job's log. It's told the commit the checks ran on and to stop if the task has moved on since. Anything in those logs is passed along as information to read, never as instructions to follow.
What comes back
The agent looks for the cause, makes the smallest fix that keeps your tests and checks in place, and runs the relevant checks itself. It leaves the change in the task for you to review and doesn't commit, push or merge it. If the failure needs access it doesn't have, or a decision from you, it says so. The button only works when the results match the task as it stands. If there are uncommitted edits or new commits the checks haven't seen, it stays greyed out, so the agent is never sent to fix a failure that no longer applies.
Sometimes it's quicker to fix it yourself
A wrong string, a version number off by one or a stray debug line isn't worth a round trip. In the Changes tab, pick a changed file and choose Edit file. Make the change and choose Save file, and it's saved as an uncommitted change in the task, next to the agent's work. If the agent changes the file while you're editing, 1904 tells you before you save, so you can copy your draft and reopen the file. Files up to 100 KB can be edited this way.