Code review agent
Junie's code review agent is a built-in subagent that reads your diff, explores the surrounding codebase for context, and returns a comprehensive code review without making changes to the code.
Instead of running a full agent session, it uses a more focused system prompt and a subset of tools required for code reviews, focusing on the changed lines only.
Why use the code review agent?
Diff-aware context loading — the code review agent determines the relevant
git diffcommand, loads the diff, and explores the project context if required.Task-specific prompt and toolset — the agent has its own system prompt and access only to the tools required for code reviews.
Session resumption for follow-ups — ask follow-up questions like "Is the fix I just pushed good enough?" without re-explaining context.
You can run the code review agent either as a local command-line tool or as part of a GitHub CI/CD pipeline.
Usage in the terminal
Use the code review agent in your terminal when you want to get a quick sanity check before opening a pull request, review your own changes after a long coding session to catch issues you might have missed, or understand what changed in a branch or between two commits.
To trigger a code review locally, use the --review flag with the junie command. You can optionally provide a natural language description to guide the review.
Junie intelligently interprets your description to determine the appropriate git diff command to execute.
Usage on GitHub
To trigger Junie's code review agent on all opened or updated GitHub pull requests, use the Junie GitHub Action for automated code reviews. See the cookbook for details.