Agent
Pull requests
Mention @trycodebot in a pull request comment to ask about the change, or to have it fix something on the branch.
Write @trycodebot and your request in any comment on a pull request: a general comment, or a reply on a review thread, including one of Codebot’s own findings.
@trycodebot why does this change the retry behavior?@trycodebot fix this and add a test for the empty case@trycodebot review is different: it runs a code review, not the agent.
What happens
- Codebot reacts with 👀 and replies On it with a link to follow the run.
- The agent reads the pull request: its description, diff, earlier comments and the thread you wrote in, plus open Codebot findings and your repository guidelines.
- It answers your question, or changes code on the pull request’s branch and pushes a commit.
- The On it reply is edited into the answer, with the commit it pushed and the review threads it resolved.
A push from the agent is a new commit like any other, so Codebot reviews the pull request again if your triggers include Commits pushed.
What it will and won’t do
The agent stays in the scope of the pull request. It answers questions about the codebase, and only changes what belongs to this pull request. For unrelated work it declines and suggests opening an issue (in Linear, if you connected it).
When it changes code it:
- pushes to the pull request’s branch only, and never force-pushes;
- rebases once if someone pushed in the meantime, and stops if that conflicts;
- can resolve Codebot’s own review threads that its change fixes.
It doesn’t open new pull requests or post reviews from a pull request mention. Pushing needs the Push branches and open pull requests permission on the Agent page; without it, the agent only answers.
Who can ask
| Git host | Who can mention the agent |
|---|---|
| GitHub | Owners, members and collaborators of the repository. Others get a 😕 reaction. |
| Azure DevOps | Anyone who can comment on the pull request. Mention the account you connected Codebot with. |
Mentions on closed pull requests and pull requests from forks aren’t answered.
Which repositories
- GitHub: any repository the TryCodeBot app can see, whether or not code review is on for it.
- Azure DevOps: repositories with code review turned on, since that’s what subscribes Codebot to their comments.
Turn mentions off for a git host with its row on the Agent page.