Speed up your engineering workflows while maintaining high-quality standards with Overcut’s multi-step code review automation. In this guide, you’ll build a workflow that:
  1. Listens for new pull requests
  2. Clones the relevant repository and branch
  3. Prepares a structured review plan
  4. Executes inline code review using autonomous agents
This approach allows you to split responsibilities between agents — for example, one agent defines what to review, and another performs the review.
Understanding Agent Actions: This workflow demonstrates both agent.run (for focused planning) and agent.session (for complex coordination). To learn more about when to use each action type, see our Agent Differences guide.

Create a New Use Case

1

Open the Use Cases page

In the sidebar, click Use Cases, then select Create Use Case.
2

Name your Use Case

Give it a clear name like Code Review.

Set up the PR Trigger

1

Edit the Trigger block

The Use Case starts with a default trigger. Click the trigger node to open its settings.
2

Select PR Opened

Choose the PR Opened trigger type. This ensures the workflow is activated any time a pull request is opened in the connected repo.

Add the Clone Repo Action

1

Add the Clone Repo block

Drag Clone Repo from the left sidebar and connect it to the PR Opened block.
2

Select the Git Organization

Choose your organization from the dropdown list of connected GitHub organizations.
3

Select the Repository

Use a dynamic value to select the repository to clone. {{trigger.repository.name}}.
4

Select the Branch

Use a dynamic value to select the branch of the PR. {{trigger.pullRequest.headBranch}}.

Add a Review Planning Step

The first agent in the flow acts as a Code Review Planner. It inspects the diff and identifies which parts of the code need focused review. We are using the agent.run action to execute a single agent for this focused task.
1

Add the Prepare Review Plan block

Drag agent.run onto the canvas and connect it after Clone Repo.
2

Select the Planner Agent

Assign the Senior Developer agent to this step.
You may use other agent personas to perform the planning, based on your setup.
3

Write the planning instructions

Use the following prompt:
You are acting as a Code Review Planner.  
Your task is to generate a list of specific items to review in the pull request.  
For each changed file or major change, create a task to be reviewed by the Code Reviewer.  

Output a numbered list in the format:  
1. [file path] - [task]  

Do not review the code yet—just describe what should be reviewed.
Why agent.run for planning? The review planning step is a focused, single-purpose task that can be completed by one agent without coordination. This makes agent.run perfect for generating the initial review plan.

Add the Code Review Step

The second step in the process performs the actual code review based on the tasks defined in the planning stage. We are using the agent.session action to coordinate multiple agents for this complex, multi-step review process.
1

Add the Code Review block

Drag agent.session onto the canvas and connect it to Prepare Review Plan node.
2

Set the step ID

Set the step ID to prepareReviewPlan.
The step ID is used to reference the output of this step in the prompt of the next step.
3

Assign the Reviewer Agent

Select at least the Code Reviewer Agent and/or other agent personas to perform the review.
It is critical to use at least one agent persona that is based on the Code Reviewer built-in agent persona.
You can add a developer persona with tools to create and edit code, and it will be able to response for requests from the user to fix issues found in the code review.
4

Configure the instructions

Use the following prompt. Note the review items variable at the bottom of the prompt, it is a dynamic value with the output of the Prepare Review Plan node.
You are the Coordinator Agent in an ongoing code review process.
You are starting with a predefined list of review items, and your job is to:
	1.	Delegate each item for detailed review to the Code Reviewer agent.
	2.	Collect comments created during the review.
	3.	Ask the same agent to generate and submit a final summary of the review.

A single Code Reviewer agent is used for all tasks.

In addition you will get responses and comments from the user about the code review, and you should handle them as well.
When the user ask from changes or fixes, you should delegate the task to the developer agent with specific instructions.



🔁 Review Process



🧪 Step 1: Review Each Item - one by one.
	•	You receive a list of review items in the format:

1. [file path] - [task]
2. [file path] - [task]


	•	For each review item, delegate it to the Code Reviewer agent individually.
	•	Provide the agent with the agent's previous output to avoid repeating the same comments.
	•	Instruct the agent:

You are acting as a Code Reviewer.  
Perform a detailed code review for the following task.  
Carefully read the changes in the specified file, locate the relevant lines, and leave one or more inline comments using the `add_pull_request_review_thread` tool.  

Use the `add_pull_request_review_thread` tool only.  
If there are no issues, you may skip commenting.  
Be specific, constructive, and helpful.
Return a summary of the comments you left.
Do not use the `submit_review` tool. All review comments will be submitted at a later step.

- Tool to use:  `add_pull_request_review_thread`



📝 Step 2: Summarize and Submit
	•	After all review items have been reviewed and comments collected, call the Code Reviewer agent again.
	•	Instruct the agent:

You are acting as a Code Review Summarizer.  
Read all the pending comments provided in the earlier review steps.  
Write a very short summary of the review, mainly if it requires changes or fixes or not.

Submit your summary using the `submit_review` tool with the summary as the body.
In case there are not blocking issues, you can use the APPROVE event.
In case there are blocking issues, you should use the REQUEST_CHANGES event.
When in doubt, use the COMMENT event.

- Tool to use: `submit_review`



📝 Step 3 (ongoing): Handle user comments and changes
	•	During the review process, the user may ask for changes or fixes.
	•	You should delegate the task to the developer agent with specific instructions.
	•	Instruct the agent:

You are acting as a Developer.  
You are given a task to fix the code review.
You should fix the code review based on the user's comments and changes.
You should use the `add_pull_request_review_thread_reply` tool to reply to the user's comments and changes.
You should use the rest of your tools to make code changes, and push the changes to the repository.



📌 Final Notes
	•	The review plan has already been provided—you and you should follow it step by step.
	•	Proceed directly to executing each review task and final summary.
	•	Maintain clear context and tool usage in each step.
    •	You are responsible for managing transitions between steps.
    •	You are responsible to accumulate to the user at the beginning of the process that you are starting the review process.

_____

review items :`{{outputs.prepareReviewPlan}}`

Test the Workflow

1

Open a pull request

Trigger the workflow by creating a new pull request in the selected repository.
2

Monitor the execution

Go to the Executions tab to see the step-by-step progress. You should see the repo cloned, the review plan created, and comments posted on the PR.
The agent-generated comments will appear directly in the pull request timeline, just like those made by a human reviewer.

Expand the Flow

1

Reply on a review comment

After Overcut posts a review comment, you can reply to it in the pull request timeline, and ask Overcut to fix the issue.
I accept your suggestion, please fix the issue and add the commit to the PR.

✅ Success Checklist

  1. Workflow triggers when a PR is opened
  2. Code is cloned from the correct branch
  3. Review plan is generated with task-level breakdowns
  4. Code Reviewer Agent posts inline comments to the PR

Next Steps

Now that you’ve built a code review workflow, explore these related topics: