Software factory / Pull requests
Ask an agent about a pull request
A big pull request has many files, commits and comments. You want to know what it does and where to look first, before you read all of it.
6 min read
The PR chat is an agent in a panel next to the pull request. You ask a question in plain words. The agent answers from the pull request, and it takes you to the tab, file, line, comment or commit that it talks about.
You need to be signed in, with read access to the pull request.
1. Open the chat
- Sign in, and open the pull request.
- Click Ask about this PR, next to the title.
The panel opens on the right of the page. On a small screen, it covers the page. To close it, click the close button or press Escape.
If the button is not there, one of these is true:
- You are not signed in.
- Screening holds the pull request. Agents never read held content.
- An admin turned off the PR chat for the repository or its organization.
2. Ask a question
Type your question in the box at the bottom of the panel, and press Enter. Shift+Enter makes a new line.
In a new chat, you can also click an example question, for example What does this pull request change?
3. Follow the agent to the right place
When a place helps the answer, the agent opens it on the page for you:
- a tab: Conversation, Commits, Files changed, Intent or Impact
- a changed file, or one line of its diff
- a comment or a review
- a commit
Under the answer, a line tells you where it went, for example "Opened Files changed: src/a.ts line 12". The panel stays open while the page moves.
The agent moves the page only inside this pull request. If a comment is on a part of the conversation that the page did not load yet, the agent opens the Conversation tab. Click Load more in the conversation until you see the comment.
4. Start a new chat
The forge saves your chat for you. Close the panel or reload the page, and your chat is still there when you open the panel again.
To start again, click New chat. The saved messages go.
Done
You ask about a pull request in plain words. The agent answers, and it takes you to the file, line, comment or commit that you need. Your chat waits for you the next time that you open the panel.
When the chat cannot answer
Your question got no answer, and the panel shows an error under the messages. Your question goes back into the box, so you do not need to type it again.
- Read the reason in the error.
- If the error has Retry, click it to send the question again. You can change the question first.
The error says one of these:
The chat could not reach the server. Check your connection, then try again.orThe chat could not answer this question. Try again in a moment.Click Retry.This pull request waits for screening, so the chat is paused.The chat works again when a maintainer approves the pull request.The PR chat is turned off for this repository.An admin can turn it on. See For admins.The chat cannot answer now, because its model is not set up. A maintainer of this repository can fix it.- The owner used its monthly model spend, or you reached your daily limit. See Limits.
An admin of the repository reads the exact problem, for example a model with no key. The error then has Open the factory settings, the page that fixes it.
If New chat fails, your chat stays, and the error says why. If the error has Retry, click it to start the new chat again.
What the agent reads
The agent reads only this pull request, and only what you can read on its page:
- the title, the description, the state, the author and the branches
- the commits, and the changed files with the lines added and deleted
- the CI checks of the head commit that you can see
- the diff of each changed file, and the comments and reviews that you can read
- the intent summary, only when you see the Intent tab, and the record of the Impact tab
The agent reads the pull request again for each question, so it knows about new commits.
What it cannot do
- It only reads. It cannot comment, review, approve, merge or push. It can tell you where on the page to do these things.
- It answers only about this pull request.
- The chat is on the pull request page only. The REST API, MCP and the
srcCLI do not have it.
Limits
- Each person can use 1,000,000 tokens of PR chat in a UTC day, with any model, also a model with your own key. After that, the chat says "You reached the PR chat limit for today. It starts again at 00:00 UTC."
- By default, the chat uses Workers AI. Then its cost counts toward the monthly spend cap of the repository owner, the same cap as the factory agents. At the cap, the chat says that the owner used its monthly model spend. It answers again next month, or when an admin picks a model with their own key.
- In a long chat, the model gets a summary of the older messages. You still see every message.
For admins: turn it off or change the model
The PR chat is on by default, with Workers AI and the model @cf/deepseek-ai/deepseek-v4.1-flash-1017. It has no trigger: it runs only when a person sends a question.
- Open the repository, then Agents. In the sidebar, click Agents under Software factory.
- Find PR chat. Its row is below the agents.
- To remove the chat from every pull request, turn off its switch. It saves at once.
- To use another model, click Settings. Pick the Model provider, the Model and the Reasoning, as for an agent. Default uses the default of the provider.
- Click Save PR chat.
On an organization, the PR chat row is on the Software factory tab. See Factory settings.
Note
A model with your own key does not count toward the monthly spend cap of the owner. Add the key in Provider keys first: see Add a model key. The daily limit of each person holds for every model.