Review code and leave comments
On this page
Use code review comments to ask your agent to change specific lines. You can collect comments across files, check them together, and send them as one message in the thread. These comments go to your Codex or Claude conversation; they aren't GitHub PR comments.
There are two places to comment: Files, when you're reading a file's current contents, and Git/Review, when you want to comment on a specific changed line in a diff.
Comment on a file
- Select the thread that should receive the feedback, then open Files from the desktop titlebar. If the machine is sleeping, wake it from the machine status control in the titlebar.
- Find the text file in the tree or search results and open it. If the file header offers Edit and Comment, switch to Comment.
- Click a line, or drag to select a range.
- Describe the change you want and choose Done. The comment will wait in the thread's Code review attachment until you send the review, so you can keep reading and add more.
For example, suppose the agent hard-coded a page size of 50 in a query you're reading. Click that line and write, "Read the page size from the pagination config instead of hard-coding it."
For a Markdown file, you can also comment while reading Preview. Select text in a paragraph or heading, then choose the Comment button that appears, or hover over a block and choose its comment button to comment on the whole block. The comments are backed by the source lines, so they will stay attached when you switch back to Source.
After you choose Done, the saved comment appears beside the code in Source and on or beside the matching rendered text in Preview. In the larger view that Pop out Files pane (in the Files header) opens, a review pane also lists your comments; use it to select, edit, or delete one, or to jump back to its place in the file.
Comment on a diff
- Select the thread that should receive the feedback. If the machine is sleeping, wake it from the machine status control in the titlebar.
- Open Git/Review from the titlebar, and check the repository selector if the project has several repositories.
- Use the selection dropdown near the top — its label shows the current selection, such as Uncommitted changes — to choose the changes you want to review: uncommitted changes, staged changes, a commit range, or a pull request.
- Open a changed file, then click a line number on an added, removed, or changed line, or drag through several line numbers. Write the comment and choose Done.
Diff comments join the same Code review attachment as your file comments, so one review can mix both.
Binary, oversized, and some generated diffs can't be shown inline, and conflict diffs are read-only. Use Files or Terminal to inspect those files.
Review and send the batch
- Open the Code review attachment in the thread composer. It shows how many files and comments are waiting, and you can edit or remove comments that no longer apply.
- Add overall instructions in the message field if needed, then choose Send.
The agent will receive each comment with its selected lines and a small amount of nearby context, not the entire file. In the transcript, the sent message appears as a Code review card containing the files, line ranges, snippets, and comments.
Check the revision
After the agent responds, reopen the files or diffs to check its changes. When you're satisfied, commit the work.