To have @cargo answer on any pull request in your go-to-market repository, install the Cargo GitHub app on the repository, deploy a Cargo coding agent bound to it, and turn on “All pull requests” on the agent’s GitHub trigger. A comment that mentions @cargo then wakes the agent, which works on that pull request’s branch and pushes its change there as a new commit instead of opening a second pull request.
Without the setting, an agent only answers on the pull requests it opened itself. The setting shipped on 2026-09-29.
What you need #
- The Cargo GitHub app on the repository. The agent acts as the app, only on repositories an admin installed it on: install it here. Connecting GitHub in Cargo does not install the app; the two are separate.
- A GitHub connector in the workspace, which the agent’s trigger uses:
cargo-ai project add connector/github. - An LLM connector for the coding harness, for example Anthropic.
- A Cargo project in the repository, so the agent is declared and deployed from the same checkout.
cargo-ai project init <dir>creates one.
Declare the agent #
import { agentConnectorTrigger, defineAgent } from "@cargo-ai/cdk";
import { anthropic } from "../connectors/anthropic";
import { github } from "../connectors/github";
export const reviewer = defineAgent("reviewer", {
harness: "claudeCode",
connector: anthropic,
languageModel: "claude-sonnet-5",
systemPrompt:
"Work on this go-to-market repository when someone asks on a pull request.",
// repository omitted: plan and deploy bind this checkout's GitHub origin
triggers: [
agentConnectorTrigger({
connector: github,
config: { allPullRequests: true },
}),
],
});
harness can also be codex or openCode. Leaving out repository binds the agent to the checkout’s origin and default branch when you plan and deploy, and that repository is the boundary for every mention the agent answers.
cargo-ai project plan # prints the binding, e.g. agent:reviewer bound to acme/gtm#main
cargo-ai project deploy
Then, on any pull request in that repository, comment:
@cargo the scoring play still reads the old employee-count column. Fix it on this branch.
The app answers to @cargo, @cargo-ai and its own handle, @cargo-hq. The agent clones the pull request’s head branch, does the work, pushes to that branch, and answers in the thread.
Who answers which mention #
| Situation | Who answers |
|---|---|
| Mention on a pull request an agent opened | that agent alone |
| Mention on any other pull request in the repository | every agent bound to it with “All pull requests” on |
| Mention on a pull request whose opening agent was deleted | falls through to the repository’s agents |
| Repository named by two Cargo workspaces | nobody |
| Pull request from a fork | nobody |
| Checks fail or a review lands | only on pull requests the agent opened, and only if enabled |
The chat that opened a pull request keeps it, so nothing is answered twice. A fork’s pull request is refused because its branch lives on the fork, which the app can neither clone nor push to. A repository named in two workspaces is refused because neither has proved it owns the repository.
The other trigger settings #
Three more settings sit on the same trigger. They concern only the pull requests the agent opened, because acting on a stranger’s pull request when nobody asked is not a request:
| Setting | Config field | What it does |
|---|---|---|
| Fix failing checks | fixFailedChecks | Wakes the agent when CI fails on its pull request, so it can push a fix |
| Attempts per pull request | maxCheckFixAttempts | How many fixes in a row before it waits to be asked: 1 to 10, default 3, reset by a mention or a review |
| Address reviews | addressReviews | Wakes the agent when someone requests changes or comments on a review |
All three are off by default, as is allPullRequests.
Why a go-to-market repository #
When plays, models, agents and company context live in a repository, a pull request is where a go-to-market change is reviewed, and the person reviewing it is the one who notices what is wrong. Asking on the pull request puts the fix in the same diff instead of a separate ticket. The setup for driving Cargo from a coding agent on your own machine is in run go-to-market from Claude Code, and the operating model is in run go-to-market with coding agents.
Frequently asked questions #
Check four things. The Cargo GitHub app must be installed on the repository. A deployed Cargo coding agent must be bound to that repository. Its GitHub trigger must have “All pull requests” on, unless the agent opened the pull request itself. And the pull request must not come from a fork, and the repository must not be named by a second Cargo workspace: both are refused.
No. It clones the branch of the pull request it was mentioned on and pushes its change there as a new commit, including on a pull request someone else opened.
No. Fixing failing checks and addressing reviews only apply to pull requests the agent opened, and only when those settings are on. On any other pull request it acts only when someone mentions it.
Yes, on a pull request no agent opened: every agent bound to the repository with “All pull requests” on answers. On a pull request an agent opened, that agent answers alone.