AI code reviewing with Code Genie
A Control repository that is created as part of creating a Loop will be automatically configured to enable AI-assisted code review using Code Genie with the Copilot dev container. Use this procedure when you want to enable interactive, AI-powered code suggestions on pull requests across your team.
Before you begin, ensure that you have:
- Administrator access to your team space.
- Created a teamspace. See Creating a teamspace.
- Created a DevOps Loop so that the Control repository, webhook, branch
protection, and default
.devops-loop/code-config.jsoncare provisioned automatically. See Creating a loop. - Read the Code Genie topic to understand how Code Genie works with AI-integrated features.
- Obtained GitHub Copilot or an IBM Bob AI agent token and save it under Manage Coding CLI section. This token is required for the Copilot or Bob dev container to authenticate with the AI service.
- Ensured your team follows a branching strategy with a protected main branch.
Code Genie runs the Copilot dev container on each
pull request to perform AI-assisted code reviews. When a pull request is
opened, Code Genie (service-account-devopscode-genie)
launches an AI agent using the configured model, such as
claude-sonnet-4.5, and analyzes the pull request diff in
the context of the repository.
During the review process, the AI agent reads the pull request diff, examines
modified files, checks for repository-specific guidance in .github
or .agents folders, and evaluates the changes for potential
security vulnerabilities, logic defects, input validation issues, edge cases,
maintainability concerns, and overall code quality. Review findings are posted
directly to the pull request as both summary comments and
line-level annotations.

Code Genie also provides a detailed CLI execution log that records the review workflow, including prompt generation, repository inspection, file reads, tool usage, code analysis steps, output generation, and validation. These logs provide transparency into how the AI agent arrived at its review findings and can be used for troubleshooting and audit purposes.
Copilot dev container associated with it is automatically
terminated. Any other open pull requests waiting for Code Genie results at
that point may not receive their comments because the container is no
longer running. This is a temporary limitation in the current release.You have configured AI-integrated Code Genie on your Control repository. Every pull request to the main branch now triggers an interactive Copilot AI code review session. Code Genie posts AI-generated code suggestions as pull request comments for developer review and approves or blocks the merge accordingly.
After completing this configuration, you can:
- Switch to a different AI model by updating the
--modelargument in the Copilot container command in Code Genie'scode-config.jsonc. - Enable the IBM Bob Shell container as an alternative AI reviewer by
uncommenting the
Bobdev container block incode-config.jsonc. - Add further dev container blocks to run additional capabilities such as unit testing or static code analysis alongside Copilot. See Code Genie.