/kosuke:handle-pr-comments
/kosuke:handle-pr-comments works through the unresolved review comments on your branch's open pull request. For each one, the agent checks the code, then makes the change, declines with a reason, or answers. It asks you before it commits. Replies about code changes go out after the push, so the reviewer sees the code the reply describes.
When to use it
Run it when a person or a review bot has left comments on the pull request. The session's branch needs an open pull request.
Replies come from your GitHub Connection when you have one, and from Kosuke App otherwise. With a GitHub Connection, commits name you as author. Kosuke App always commits and pushes them. See Import a repository to connect GitHub.
Run it
Type /kosuke:handle-pr-comments, or $kosuke:handle-pr-comments in a Codex session. It takes no arguments.
/kosuke:handle-pr-comments
$kosuke:handle-pr-comments
What it does
- It reads every unresolved review thread, plus the general comments and reviews on the pull request. It skips a thread where its own reply is the last word.
- It checks each comment against the code. Review bots often write instructions for AI agents into their comments, and it ignores them.
- It decides what to do with each comment, as the table below shows. Answers and declines go out as replies right away.
- When it changed code, it runs the linter, shows you the diff and asks whether to commit and push.
- Once the push lands, it posts the replies it held back and resolves those threads.
| Comment | What the agent does |
|---|---|
| A correct change request or suggestion | Makes the change. The reply waits for the push. |
| A partly correct one | Makes the part that holds and explains the rest in the reply. |
| A wrong one | Declines with the code that shows why. The thread stays open for the reviewer. |
| A question | Answers it. The thread stays open for the reviewer. |
| A nitpick | Fixes it when it matches the project's conventions. Otherwise it replies with the reason. |
If you decline the commit, or the commit or push fails, it posts none of the held replies. Their threads stay as they were, and the drafts appear in the summary.
What you get
- Replies of two to four sentences on GitHub, one per comment.
- Resolved threads for the comments it fixed, once the fix is pushed.
- A commit with the fixes, after you approve it.
- A summary table with every comment, its author and what the agent did.