Office hours: Build your self-driving GTM engine·Oct 29, 9:00am PT, onlineRegister→
Cargo
  • PrimitivesData ModelsYour companies, contacts and deals, merged from every sourceContextWhat your team knows, as files every agent readsTerritoriesWho sells where, defined onceMailboxesMailboxes in your reps' names, warmed up and kept under limitsToolsThe actions your agents, plays and reps callAgentsAI that researches, decides and writes, reading your contextPlaysWorkflows that run on a trigger or a schedule, with retriesAppsInternal apps for your reps, hosted on Cargo
    Add-onsChrome ExtensionSell faster, right in your browserButtonTrigger AI agents inside your CRMFormTurn any tool into an embeddable formSlackTag Cargo in Slack. It does the GTM workGitHubPlan on every pull request, deploy on merge
    MoreProjectsDefine your entire GTM in codeCLIUse Cargo from your terminalMCPUse Cargo from Claude and ChatGPTDeveloper resourcesCargo API docs, OpenAPI spec, auth docs, webhooks, MCP serverAPI ReferenceExplore the Cargo APIDocumentationLearn how to use CargoIntegrationsConnected to your entire GTM stack
  • VeriffHow Veriff replaced MuleSoft with Cargo under NetSuite, Stripe and SalesforceAugmentHow Augment Code routes developer sign-ups to reps in under an hourWeights & BiasesHow Weights & Biases ships a new purchase signal in 2 days on CargoSee all
  • Pricing
  • Cookbooks
  • Blog
Sign in
Blog

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

12 Nov5min read
AurelienAurelien

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 Cargo project of the workspace connected to the repository, which is how the workspace proves it owns it: see connect a repository.
  • 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 { agentNativeTrigger, defineAgent } from "@cargo-ai/cdk";

import { anthropic } from "../connectors/anthropic";

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.",
  // state omitted: plan and deploy bind this project's connected state
  triggers: [
    // The project's pull requests: the native agent `state`. On GitHub its
    // events arrive through the Cargo GitHub app, so no connector.
    agentNativeTrigger({
      agentSlug: "state",
      config: { allPullRequests: true },
    }),
  ],
});

harness can also be codex or openCode. Leaving out state binds the agent to the project cargo.state.json points at when you plan and deploy, so it clones that project’s repository, directory and production branch, and that repository is the boundary for every mention the agent answers. state: stateRef("<uuid>") names another project of the workspace, and env and runAs set the agent’s environment variables and the service user it runs as.

shellscript
cargo-ai project plan     # prints the binding, e.g. agent:reviewer bound to this project's state <uuid>
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 no Cargo project is connected tonobody
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 no Cargo project is connected to is refused because no workspace has proved it owns it: only the workspace that connected one answers there.

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 #

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 a project of the agent’s workspace must be connected to the repository.

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.

~/run-it-on-cargo/

Build this workflow instead of reading about it.

Cargo is the GTM infrastructure your coding agent builds on: enrichment, scoring, routing and outreach, defined in code and run in production.

Start building
AurelienAurelienNov 12, 2026
On this page
  • What you need
  • Declare the agent
  • Who answers which mention
  • The other trigger settings
  • Why a go-to-market repository
  • Frequently asked questions

Stay Informed with our
weekly Newsletter

Related articlesSee all articles
GTM Engineering
Build vs Buy: Scaling Your GTM Engineering Stack in 2026

When a GTM engineering team should build revenue infrastructure in-house and when to buy a platform: what the second year of a custom stack costs, where the line sits layer by layer, and what one system can honestly replace.

AurelienAurelien·Nov 17, 2026
GTM Engineering
Building a Self-Driving GTM Engine with Agentic Infrastructure

Agentic GTM infrastructure is what a self-driving GTM engine runs on: AI agents defined and deployed as code, orchestration workflows callable from the UI, the CLI, the API and agents, and one unified data model behind lead routing and scoring.

AurelienAurelien·Nov 17, 2026
GTM Engineering
GTM as Code: The Complete Guide to Running Your Go-to-Market as Code

How to run your go-to-market as code, end to end: declare it as a Cargo project in a git repository, preview each pull request, deploy on merge, run one-off batches, test agents, draw the graph and roll back. Every step, with the command and the page that covers it.

AurelienAurelien·Nov 17, 2026

Build the self-driving GTM engine

Your coding agents build it on Cargo.Or our team builds, operates and improves it with you.

Start building
Cargo
Backed byY CombinatorSOC 2 Type IICertified
LinkedinX

Product

Data ModelsContextTerritoriesMailboxesToolsAI AgentsPlaysAppsIntegrationsPricing

Add-ons

Chrome extensionButtonFormSlackGitHub

Build

DocsDeveloper resourcesCargo API docsCargo OpenAPI specCargo auth docsCargo webhooksCargo MCP serverProjectsClaude CodeCodexCursorAll coding agents

Resources

ReportsBlogCustomer storiesCookbooksEnrichmentRoutingSignalsScoringCRM hygieneAd audiencesGTM skillsGTM EngineeringGlossaryCompareCargo x ClayCargo x WorkatoCargo x n8nCargo x DeeplineCargo x DefaultCargo x LeanDataCargo x UnifyCargo x ValleyCargo x GojiberryCargo x PhantomBusterCargo x ZapierCargo x ApolloCargo x Chili PiperCargo x Common RoomCargo x MakeCargo x Tray.io

Company

ManifestoCommunityEventsJobsPartners DirectoryPartner Program

Legal

SecurityTerms of servicePrivacy PolicyRefundsDPASupport
© 2026 Cargo
 ////////    ///////    ////////     ////////    ///////
///         ///   ///   ///   ///   ///         ///   ///
///         ///   ///   ///   ///   ///         ///   ///
///         /////////   ////////    ///  ////   ///   ///
///         ///   ///   /// ///     ///   ///   ///   ///
///         ///   ///   ///  ///    ///   ///   ///   ///
 ////////   ///   ///   ///   ///    ///////     ///////

$ npm install -g @cargo-ai/cli