Skip to content

Bug: Agent completes PRs even when CI fails #1

@nurazon59

Description

@nurazon59

Describe the bug

First of all, thank you for providing such a helpful tool.

Hello,

I would like to report an issue with Amazon Q Agent.

When the agent creates a pull request and the CI checks fail, it still posts the following message:

✅ I finished the code review, and didn't find any security or code quality issues..

This is misleading, as the agent itself wrote the code and the CI has already failed.
In this case, the agent should not mark the PR as reviewed or complete.
Instead, it should recognize the CI failure and request fixing the issues it caused before considering the PR as reviewed.

Could you please investigate and address this issue?

Thank you in advance.

Expected Behavior

When the agent creates a pull request and the CI checks fail, it should not consider the code review complete.
Instead, the agent should automatically fix the issues until the CI passes successfully, and only then mark the pull request as reviewed and complete.

Current Behavior

When the agent creates a pull request and the CI checks fail, it still posts the following message:

✅ I finished the code review, and didn't find any security or code quality issues..

Reproduction Steps

  1. Use Amazon Q Agent to generate code and create a pull request.

  2. Ensure that the generated code has issues that will cause CI to fail (for example, intentionally break coding style or introduce a simple syntax error).

  3. Wait for the CI to run and fail.

  4. Observe that despite the CI failure, the agent posts the following message:

✅ I finished the code review, and didn't find any security or code quality issues..

This completes the pull request review incorrectly even though CI did not pass.

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreview agentRelated to code review agent functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions