Minions: Stripe’s one-shot, end-to-end coding agents

Minions are Stripe’s homegrown coding agents, responsible for more than a thousand pull requests merged each week. Though humans review the code, minions write it from start to finish. Learn how they work, and how we built them.

Alistair Gray
8 min readbeginner
--
View Original

Overview

Stripe built homegrown unattended coding agents called Minions that one-shot entire tasks from Slack message to merged pull request. Over a thousand PRs per week at Stripe are fully minion-produced with no human-written code, enabling engineers to parallelize work by spinning up multiple agents simultaneously. The article covers how engineers use minions, their integration points, the agent architecture built on a fork of Block's Goose, and the feedback loops including local linting and CI testing.

What You'll Learn

1

Why Stripe built custom unattended coding agents instead of using off-the-shelf tools

2

How to design ergonomic entry points for coding agents across Slack, CLI, web, and internal platforms

3

How to structure an agent feedback loop with local linting, CI testing, and bounded retry rounds

4

Why isolated developer environments (devboxes) enable safe, parallelized agent execution

5

How MCP provides a common language for connecting coding agents to internal tools and context sources

Prerequisites & Requirements

  • Understanding of CI/CD pipelines and pull request workflows
  • Familiarity with LLM-based coding agents and their capabilities
  • Basic understanding of MCP (Model Context Protocol) for LLM function calling(optional)
  • Experience working in large-scale monorepo codebases(optional)

Key Questions Answered

What are Stripe's Minions coding agents and how many PRs do they produce?
Minions are Stripe's homegrown, fully unattended coding agents built to one-shot tasks end-to-end. Over a thousand pull requests merged each week at Stripe are completely minion-produced, containing no human-written code though they are human-reviewed. They run from a Slack message to a CI-passing pull request with no interaction in between.
Why did Stripe build custom coding agents instead of using existing tools?
Stripe's codebase has hundreds of millions of lines of code, uses a relatively uncommon Ruby with Sorbet typing stack (not Rails), and relies on vast homegrown libraries natively unfamiliar to LLMs. The code processes over $1 trillion per year in payment volume with complex regulatory and compliance obligations. Stripe needed agents tightly integrated with their existing developer productivity tooling across source control, environments, code generation, and CI.
How do engineers invoke and interact with Stripe's Minions agents?
Engineers most frequently start minions from Slack by tagging the Slack app, which accesses the entire thread and linked context. Minions can also be invoked via CLI, web interfaces, and internal platforms like the docs platform, feature flag platform, and ticketing UI. Engineers can monitor agent decisions in a web UI and iterate on completed runs by giving further instructions or editing code manually.
What underlying technology powers Stripe's Minions coding agents?
Minions run on a fork of Block's open-source coding agent Goose, customized to interleave agent loops with deterministic code for git operations, linters, and testing. They run in isolated pre-warmed devboxes that spin up in 10 seconds with Stripe code and services pre-loaded. They connect to MCP via a central internal server called Toolshed hosting over 400 tools spanning internal systems and SaaS platforms.
How do Stripe's coding agents handle test failures and CI feedback?
Minions use multiple automated feedback layers. First, a local executable runs selected lints on each git push in under five seconds using heuristics. If that passes, CI selectively runs tests from Stripe's battery of over three million tests. Many tests have autofixes that are automatically applied. If no autofix exists, the failure goes back to the minion. They allow at most two CI rounds to balance speed, cost, and diminishing returns.
How does Stripe use MCP with their coding agents?
Stripe built a central internal MCP server called Toolshed that hosts over 400 MCP tools spanning internal systems and SaaS platforms. MCP provides a common language for networkable LLM function calling, allowing minions to gather context like internal documentation, ticket details, build statuses, and code intelligence via Sourcegraph search. Relevant MCP tools are deterministically run over likely-looking links before a minion run even starts to hydrate context.
How do Stripe's Minions handle agent rule files and conditional configuration?
Minions read the same coding agent rule files that human-operated tools like Cursor and Claude Code use, consuming several different agent rule file formats. Since it would be impractical for Stripe to have many unconditional rules across their massive codebase, almost all agent rules are conditionally applied based on subdirectories, allowing targeted guidance for different parts of the codebase.
What is Stripe's approach to shifting feedback left for coding agents?
Stripe applies the 'shift feedback left' principle to both human and agent developer productivity. Any lint step that would fail in CI is enforced in the IDE or on a git push, presented immediately to the engineer or agent. Local linting runs in under five seconds using heuristics to select relevant checks. This reduces expensive CI runs, saves tokens and compute, and provides faster iteration cycles for agents.

Key Statistics & Figures

Minion-produced pull requests merged per week
Over 1,000
Completely minion-produced PRs with no human-written code, though human-reviewed
Stripe codebase size
Hundreds of millions of lines of code
Across a few large repositories
Annual payment volume processed
Over $1 trillion
Live production payment volume running through Stripe's code
Devbox spin-up time
10 seconds
Pre-warmed isolated developer environments with Stripe code and services pre-loaded
MCP tools available in Toolshed
Over 400
Spanning internal systems and SaaS platforms used at Stripe
Total test count
Over 3 million
Stripe's full battery of tests that CI selectively runs upon a push
Local lint execution time
Less than 5 seconds
Automated local executable using heuristics to select and run lints on each git push
Maximum CI retry rounds
2
At most two rounds of CI to balance speed, compute cost, and diminishing returns

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Coding Agent Framework
Goose
Block's open-source coding agent, forked by Stripe as the core agent loop for minions
Protocol
Mcp
Model Context Protocol providing common language for networkable LLM function calling to gather context
Communication Platform
Slack
Primary entry point for engineers to invoke minions via tagging the Slack app in threads
Programming Language
Ruby
Primary backend language at Stripe (not Rails)
Type Checker
Sorbet
Static type checker for Ruby used across Stripe's backend codebase
Code Intelligence
Sourcegraph
Code intelligence and search accessed via MCP for agent context gathering
AI Assistant
Claude
Used by developers for interactive planning and collaboration alongside minions
AI Code Editor
Cursor
Used by developers for interactive coding alongside minions, shares agent rule files
AI Coding Tool
Claude Code
Mentioned as consuming the same agent rule file formats as minions

Key Actionable Insights

1
Build unattended coding agents that reuse the same developer tooling as human engineers rather than creating separate agent-specific infrastructure. Stripe's minions use the same devboxes, linters, CI pipelines, and agent rule files that human engineers use, following the principle that 'if it's good for humans, it's good for LLMs, too.'
This approach reduces maintenance burden and ensures agents follow the same quality standards and best practices as human developers, while leveraging existing investments in developer productivity infrastructure.
2
Limit CI retry rounds to at most two iterations when building automated coding agents, as there are diminishing marginal returns for an LLM to run many rounds of a full CI loop. Fix everything possible locally before pushing to CI, using fast local linting heuristics that run in seconds rather than expensive full CI runs.
Each CI run costs tokens, compute, and time. Stripe found that 'often one, at most two CI runs—and only after we've fixed everything we can locally' strikes the right balance between speed and completeness for their agent workflow.
3
Implement conditional agent rules based on subdirectories rather than maintaining many unconditional global rules. In a large codebase, blanket rules become impractical and can conflict across different domains, so scoping agent guidance to specific parts of the codebase provides more targeted and effective instructions.
Stripe applies this pattern across their hundreds of millions of lines of code, allowing different teams and codebases to have their own agent configurations without creating global rule conflicts.
4
Pre-hydrate agent context by deterministically running relevant MCP tools over links and references before the agent loop even begins. This gives the agent rich context from documentation, tickets, build statuses, and code search upfront rather than relying on it to discover and fetch this information during its run.
Stripe deterministically processes likely-looking links before a minion run starts, reducing agent exploration time and improving first-attempt success rates for one-shot task completion.
5
Use isolated, pre-warmed developer environments for agent execution to enable safe parallelization. Stripe spins up devboxes in 10 seconds with code and services pre-loaded, isolated from production and the internet, eliminating the need for human permission checks and avoiding the overhead of alternatives like git worktrees.
This architecture enables engineers to spin up multiple minions in parallel, which is particularly valuable during on-call rotations for resolving many small issues simultaneously.
6
Design multiple ergonomic entry points for coding agents that integrate naturally into existing developer workflows. Rather than requiring engineers to context-switch to a separate tool, embed agent invocation directly into Slack threads, internal ticketing systems, feature flag platforms, and documentation tools where engineers already work.
Stripe integrates minion invocation into Slack (most common entry point), CLI, web UI, internal docs platform, feature flag platform, and ticketing UI, making it effortless to kick off an agent from wherever the relevant context already exists.

Common Pitfalls

1
Running too many CI retry rounds for agent-produced code, which burns tokens, compute, and time with diminishing marginal returns. LLMs don't reliably improve after multiple failed CI iterations on the same issue, making unbounded retries wasteful and slow.
Stripe caps CI rounds at two maximum. Fix everything possible with fast local linting first (under 5 seconds), then allow at most one CI retry before accepting the result as a starting point for human refinement.
2
Applying unconditional global agent rules across a massive codebase, which becomes impractical as different subdirectories have conflicting conventions, frameworks, and requirements. Global rules create noise and can lead to agents following wrong patterns for specific code areas.
Stripe conditionally applies almost all agent rules based on subdirectories, allowing targeted guidance appropriate for each part of their hundreds of millions of lines of code.
3
Expecting LLM agents to intuitively navigate a large, complex codebase without investing in the same tooling and context that human engineers need. Agents building software from scratch face fewer constraints than agents iterating on a mature codebase with homegrown libraries, intricate dependencies, and compliance obligations.
Stripe provides agents with the same developer tooling as human engineers, pre-hydrates context via MCP, and uses isolated devboxes pre-loaded with code and services to bridge this gap.
4
Relying solely on CI for feedback instead of shifting feedback left with fast local checks. Waiting for a full CI run to catch lint failures or obvious issues wastes time and compute when these could be caught locally in seconds.
Stripe enforces lint checks on git push locally in under 5 seconds using heuristics, only sending code to CI after local checks pass. Many CI test failures have autofixes that are automatically applied.

Related Concepts

Agentic Coding
Unattended Coding Agents
Developer Productivity
CI/CD Pipelines
Model Context Protocol (mcp)
Llm Orchestration
Agent Rule Files
Shift-left Testing
Developer Environments (devboxes)
Code Intelligence
Monorepo Development
Agent Feedback Loops
One-shot Task Completion
Developer Experience Tooling