Your GTM belongs in gitRegister
Blog

Ask @cargo on a Pull Request in Your Go-to-Market Repository

16 Oct
5min read

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 #

typescript
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.

shellscript
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:

text
@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 #

SituationWho answers
Mention on a pull request an agent openedthat agent alone
Mention on any other pull request in the repositoryevery agent bound to it with “All pull requests” on
Mention on a pull request whose opening agent was deletedfalls through to the repository’s agents
Repository named by two Cargo workspacesnobody
Pull request from a forknobody
Checks fail or a review landsonly 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:

SettingConfig fieldWhat it does
Fix failing checksfixFailedChecksWakes the agent when CI fails on its pull request, so it can push a fix
Attempts per pull requestmaxCheckFixAttemptsHow many fixes in a row before it waits to be asked: 1 to 10, default 3, reset by a mention or a review
Address reviewsaddressReviewsWakes 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 #

AurelienOct 16, 2026

Give your agents a runtime

Bring the agents you have.Start free, deploy in one command.