AI agents write and review most new code at Snap
Snap built Casper, a remote coding agent that engineers call from Slack, and CodePal, an AI code reviewer, so that agents write and check most changes while an engineer approves each pull request.
Snap Inc.United StatesInternet platforms and advertisingScaled
- Scale
- 14 golden-path agents; CodePal reviews 90% of all pull requests at Snap
- Scenario
- AI code review and coding agents
- Business function
- Software engineering
- Kind of solution
- Software engineering assistant
- Who built it
- Built in-house
- Human oversight
- People approve each output
- Organization
- Enterprise, 1,000 to 9,999 employees
- AI types
- Generative AI, Agentic AI, Conversational AI
- Unit cost
- ~$0.40 per review
tl;drSnap's merged pull requests more than doubled in Q3 2026 as the defect rate per merge fell over 71%.See the results
Snap Inc. runs a managed set of AI agents that write, review, and open pull requests for its engineers6, 7. Casper, its remote coding agent, turns a task in a Slack thread into a validated pull request. CodePal, its AI code reviewer, checks that change before an engineer approves it6.
In April 2026, Snap cut about 1,000 jobs in a restructuring that its CEO tied to advances in AI2. The same day, its investor update reported that more than 65% of new code was AI-generated3. By August 2026, Saral Jain, Snap’s head of engineering and CIO, said that AI agents write more than 90% of all code7.
In Q3 2026, Snap’s engineering teams more than doubled their merged pull requests year over year, while the defect rate per merged pull request fell over 71%9.
Before the deployment
Snap’s engineers already used AI coding tools such as Cursor and Claude Code daily, and by June 2026 the merged pull request rate was up 60% for the year5. Faster writing moved the bottleneck to code review and to engineer attention. The engineering organization faced the following problems:
- Review backlog: More and larger pull requests stretched reviewers thinner, so review queues backed up and merge times grew5.
- Slow first review: The median wait for the first human review was about 5 hours5.
- Routine work: Fixing a flaky test, addressing a lint violation, or bumping a dependency each took context switches and review cycles from engineers6.
- Coordination tax: A change across 20 services meant convincing the owners of all 20 services to put it on their roadmaps7.
- A complex codebase: Snap’s code spans thousands of services and multiple languages, where a generic off-the-shelf agent doesn’t thrive6.
The company was also under financial pressure. In his April 2026 letter, CEO Evan Spiegel described a “crucible moment” that called for a faster and more efficient way of working2. Jain recalls that a year earlier, Snap used AI as a “glorified autocomplete”7.
What was built
Snap built a “golden path” of 14 managed agents that cover almost 90% of an engineer’s daily workflow, out of thousands of agents in its inventory7. Casper writes code, CodePal reviews it, and an engineer owns what ships5, 6. The work is divided as follows:
- Casper: A fleet of remote agents that engineers call from Slack, a web console, or a trigger. Each agent gathers context, makes the smallest safe change in a sandbox, validates it, and opens a pull request6.
- CodePal: The AI reviewer that reviews 90% of all pull requests at Snap before a human does. It looks for logic errors, null pointer risks, race conditions, resource leaks, and similar bugs that tests miss5.
- Code Search: The retrieval layer that both agents use to find code owners, reuse established patterns, and see downstream callers in other repositories5, 6.
- MCP Gateway and trusted controller: Deterministic software that limits each Casper session to the permissions of the user who started it and keeps source-control credentials out of the agent6.
- Engineers: They describe the task, approve plans where Casper asks, and give the final approval on every pull request5, 6.
“Whether it was drafted by AI or human is immaterial. It’s the ultimate ownership.”
The review bar follows the risk of the change7. An internal dashboard without sensitive data can be fully AI-generated with very little human review, and sometimes auto-approved. A privacy-sensitive change that reaches a billion people needs an engineer who understands the spec and the code7.
Alternatives considered
Snap weighed the following options before it built its own agents:
- Vendor coding agents: Vendor products solved some but not all of Snap’s needs. Snap wanted integration with its internal services, CodePal, and Code Search, control of agent identity and security, independence from any harness or model family, and its own user experience6.
- Vendor code review tools: Snap built CodePal in-house because the tools lacked integration depth with its build systems and internal configuration. It shipped a working demo in two weeks, before a vendor procurement cycle had finished5.
- Local coding agents: Casper runs the same agent loop as Claude Code or Codex, but remotely, under a managed identity, and already connected to Snap’s systems6.
- Many disconnected agents: Snap put its effort into a few managed agents, because the safe way should be the easy way7.
Rollout
CodePal reached most of Snap’s pull requests in one quarter, in the following phases5:
- An opt-in experiment, which started at 9% of pull requests5.
- Mandatory reviews in a handful of repositories that needed consistent, thorough reviews5.
- Voluntary use across 300 repositories, with more than 70% positive sentiment5.
- Automatic opt-in for teams, which took CodePal to over 90% of all pull requests5.
Casper reached general availability in the quarter before its July 2026 write-up. Since then, teams have created hundreds of custom Casper agents for on-call work, status summaries, audit evidence checks, and test expansion6.
Technology and architecture
Casper and CodePal draw on the same code context from Code Search, so the writing side and the review side see the same code6. The following table lists the parts of the solution.
| Layer | What they used | Role | Source |
|---|---|---|---|
| Task agent | Casper | Takes a task, changes code in a sandbox, validates it, and opens a pull request | 6 |
| Checker model | CodePal | Reviews pull requests for bugs and writes summaries and descriptions | 5 |
| Language model | Frontier language models | Run the agent loops, with the model picked per agent template | 6, 7 |
| Search and vector index | Code Search | Semantic search across Snap’s full codebase | 5, 6 |
| Tools and actions | MCP Gateway | Standard interface to internal tools that enforces the user’s permissions | 6 |
| Access and identity | Trusted controller | Holds source-control operations and authorizes each call | 6 |
| Chat interface | Slack | Where engineers start, steer, and receive Casper sessions | 6 |
| Operations console | Agents Portal | Web console and system of record for every session | 6 |
| Developer tools | Claude Code | Local AI coding tool that engineers use daily | 5 |
| Developer tools | Cursor | Local AI coding tool that engineers use daily | 5 |
| Offline evaluation | CodePal evaluation framework | Ground truth data set and A/B tests for each CodePal change | 5 |
| Audit trail | Agent registry and audit trails | Record what each agent should do and what it did | 7 |
Snap uses frontier models from the big labs and experiments with open-source models7. A Casper agent template sets the model, the system prompt, the tools, and the runtime image for each team’s agent6.
Data inputs
The agents use the following data:
- Task conversation: The Slack thread or Jira ticket that starts a Casper session, with its linked documents6.
- Pull request diff: The change that CodePal reviews. Each new commit triggers a focused re-review5.
- Surrounding code: Files that CodePal picks by symbol overlap with the diff, and callers in other repositories from Code Search5.
- Repository guidance: Repo-level rule files, team-authored skills, .codepal.yaml settings, and per-path instructions5, 6.
- Engineer feedback: Votes on CodePal comments, plus findings that authors fixed or ignored, which feed a ground truth data set5.
Integrations
The agents connect to the following systems:
- Slack: Casper reads the thread, replies with live progress, and posts the pull request back into the same conversation6.
- Jira: Casper reads tickets for context, and a Jira label can start a session6.
- GitHub Enterprise: CodePal reads each change in memory through the GitHub Enterprise API and never clones the repository. Casper pushes a casper/-prefixed branch and opens a normal pull request5, 6.
- Build and test environment: Casper runs builds, tests, and linters in the repository’s real development environment6.
- MCP Gateway: Once a new MCP tool is on the gateway, every Casper agent can use it without per-agent integration work6.
How CodePal reviews a pull request
CodePal reviews each pull request in the following stages:
- A parent workflow parses the repository with tree-sitter into a symbol-to-file index. It scores files by symbol overlap with the diff and keeps the top files that fit the token budget5.
- Two review passes run in parallel on the same model, with different sampling parameters5.
- A supervisor compares the two sets of findings. If they disagree, a third pass counts, and each pass that finds something new starts another5.
- A verifier drops any finding that cites a symbol absent from the supplied context. CodePal posts the remaining findings in line on the pull request5, 6.
Child workflows for the review, the summary, and the description all read the same stored context, so the summary and description need no new context build5.
How one task flows through the system
A coding task moves through the following steps:
- An engineer tags @casper in a Slack thread with a plain-language task. Casper reads the earlier messages as context6.
- Casper starts a durable session in a fresh, isolated sandbox. The session runs under a mirror of the engineer’s identity, so Casper can only do what that engineer can6.
- Casper reads the linked Jira ticket, documents, and repo rule files, and searches across Snap through Code Search6.
- Casper plans the smallest safe change and asks the engineer for approval where needed6.
- Casper edits the code and runs builds, tests, and linters. If a check fails, it reads the output, revises the change, and runs it again6.
- Casper pushes a casper/-prefixed branch through the trusted controller and opens a pull request6.
- CodePal reviews the pull request at once, and Casper addresses the findings6.
- Casper delivers the pull request in the Slack thread. The engineer reviews it and gives the final approval before it merges5, 6.
Results
Snap reports the results for its engineering organization as a whole8, 9. The following table lists the main figures.
| Metric | Before | After | Scope and timeframe | Reported by |
|---|---|---|---|---|
| Defect rate per merged pull request | Not disclosed | Down over 71% | Q3 2026, year over year | Snap, measured9 |
| Merged pull requests | Not disclosed | More than doubled | Q3 2026, year over year | Snap, measured9 |
| Code commits per engineer | Not disclosed | Up 75% | Q2 2026, year over year | Snap, measured8, 7 |
| Major reliability issues | Not disclosed | Down 57% | Q2 2026, year over year | Snap, measured8, 7 |
| AI-generated share of new code | Not disclosed | more than 65% | As of April 2026 | Snap, measured3, 1 |
| Pull requests with a CodePal review | Virtually none | Over 90% | Within one quarter | Snap, measured5 |
| CodePal recall of true positives | 30% | 80% | Same quarter | Snap, measured5 |
Each metric covers the following:
- Defect rate and merged pull requests: Both compare Q3 2026 with a year earlier for Snap’s engineering teams9.
- Commits and reliability issues: Both compare Q2 2026 with a year earlier. Jain described the 57% as a fall in severe outages7, 8.
- AI share of code: The April 2026 figure counts AI-generated new code. In August 2026, Jain said that AI agents write more than 90% of all code3, 7.
- CodePal quality: Recall counts real bugs found consistently across reviews. CodePal also found 75% more bugs with a positive rating, and engineer sentiment on its findings reached 80% positive5.
- Review speed and time saved: CodePal reviews complete within 10 minutes, against a median wait of about 5 hours for the first human review. Snap estimates that CodePal saved an estimated 30,000 hours of code-review time5, 8.
- Volume: Casper produces thousands of mergeable pull requests each week, and CodePal performed over 200k reviews in four months5, 6.
Lessons learned
Speed and quality figures moved together. In Q3 2026, merged pull requests more than doubled while the defect rate per merged pull request fell over 71%, and in Q2 commits per engineer rose 75% as major reliability issues fell 57%8, 9.
Context mattered more than model choice for CodePal. In almost every missed bug reported to the team, the bigger issue was the context supplied to the model5. Four investments drove the recall gain, including the multi-pass loop and a bug scope widened from eight to 12 categories5.
The figures are Snap’s own, from its SEC filings, its engineering blog, and Jain’s interview, and the news coverage relays them1, 3, 5, 7, 8, 9. CodePal’s 0% false-positive rate was measured on a held-out golden data set, not on live traffic5.
Snap’s figures differ by date and by definition. The April 2026 investor update counts more than 65% of new code as AI-generated, while Jain said in August that agents write more than 90% of all code3, 7. The Casper blog post counts thousands of mergeable pull requests each week, while Jain said that Casper generates thousands every month6, 7.
Early CodePal reviews were inconsistent across runs and sometimes hallucinated what the code was meant to do, and the team had no way to validate changes before rollout5. In Snap’s largest repositories, generic CodePal reviews generate noise until teams add their own configuration5. AI review doesn’t yet replace human review, and every pull request still needs a final engineering approval5.
Jain names the risks that remain. Agents can be wrong subtly and confidently, and more generated code brings more security vulnerabilities7. He also worries that engineers could come to ship changes they don’t understand7.
Outside voices questioned the link between AI and the job cuts. In March 2026, activist investor Irenic Capital Management had recommended 1,000 job cuts, arguing that “AI can and should replace many existing roles”1. In LeadDev, Alan Cohen, a data analyst at RationalFX, said that “the AI narrative starts to look more like cover than cause” when the financial imperative comes first4.
Case study scorecard
- over 71% Decline in the defect rate per merged pull request9
- 75% Increase in code commits per engineer8, 7
- 57% Decline in major reliability issues8, 7
- more than 65% AI-generated share of new code3, 1
Sources by publication date
- Organization 8
- Press, academic, and regulators 3
Build this solution yourself
Analysis
What you need
To build this solution, you need the following in place:
- A searchable map of your whole codebase: Casper and CodePal both rely on Code Search for owners, patterns, and cross-repository callers, and most missed CodePal bugs traced to missing context5, 6.
- Identity that follows every agent call: Casper skips per-command approvals because it runs in a disposable sandbox, under the user’s own permissions, behind a controller that holds the credentials6.
- A ground truth set from your engineers’ feedback: Snap needed one to measure CodePal’s recall and false positives and to A/B test each change, because user feedback alone was too slow5.
- A review process that can absorb agent volume: Every pull request still needs a final engineering approval, so check that your reviewers can keep up once agents open thousands of them5, 6.
Reference architecture
Software engineering assistant
A software engineering assistant writes, reviews, tests, or migrates code in the tools that developers already use, and a developer approves its output. A language model writes a change, a test, or a review comment from the code for a task, and automated checks and a checker model build, test, and filter it. A reviewer approves each checked proposal in code review before it merges, and developers do the work that fails the checks by hand.
- Developer tools (documented in this case study)
- Assistant platform
- Code repository
- Code index (documented in this case study)
- Deterministic code analysis
- Standards and guidelines
- Code and platform map
- Prompts and context
- Language model (documented in this case study)
- Automated checks
- Checker model (documented in this case study)
A check mark shows a building block that this case study's sources document.
Open the reference architectureOthers who built it
- Stripe: its homegrown minions run unattended, and over 1,300 of the pull requests Stripe merges each week are minion-produced and human-reviewed, with no human-written code10.
- Spotify: engineers start its background coding agent from Slack and GitHub Enterprise through MCP, and teams had merged more than 1,500 of its pull requests by November 202511.
In the library
- How Uber scaled coding agents and cut cost per session Uber
- Pictet takes Claude Code from developers to business teams Pictet Group
- TUI cuts external IT staff with AI coding assistants TUI Group
- eBay's Copilot pilot cut pull request merge time by 17% eBay
- Meta's just-in-time LLM tests catch bugs before code lands Meta
- AI coding assistants speed up software work at Deutsche Bank Deutsche Bank
Cite this case study
Enterprise AI Case Studies. "AI agents write and review most new code at Snap." Updated Nov 18, 2026. https://case-studies.ai/case-studies/engineering-and-research/ER-020-ai-coding-agents-code-review-snap/
@misc{csai-er-020,
author = {{Enterprise AI Case Studies}},
title = {{AI agents write and review most new code at Snap}},
year = {2026},
note = {Updated 2026-11-18},
url = {https://case-studies.ai/case-studies/engineering-and-research/ER-020-ai-coding-agents-code-review-snap/}
}Sources
The following reporting, and every passage quoted from it, belongs to its publisher, not to this site. Sources and ownership
- Source 1:
Snap Cuts 1,000 Jobs, Aims to Save $500 Million as AI Reshapes Operations
Supporting excerpts (7)
Snap laid off approximately 1,000 team members, representing 16% of its full-time workforce.
AI agents are generating over 65% of Snap's new code, according to CNBC, and responding to over 1 million queries per month.
The restructuring affects Snap's workforce of about 5,261 full-time employees as of December 2025, with the company also closing more than 300 open roles.
rapid advancements in artificial intelligence enable our teams to reduce repetitive work, increase velocity, and better support our community, partners, and advertisers
The firm sent a letter to Spiegel in March recommending workforce reductions of 1,000 employees
AI can and should replace many existing roles
Irenic Capital Management said in its push for the restructuring
- Source 2:
Organizational Changes at Snap (Exhibit 99.1 to Form 8-K)
Supporting excerpts (4)
Today we are announcing changes that will impact approximately 1,000 team members at Snap, including 16% of our full time employees, in addition to closing
we expect to reduce our annualized cost base by more than $500 million by the second half of 2026
Last fall, I described Snap as facing a crucible moment, requiring a new way of working that is faster and more efficient, while pivoting towards profitable
We have already witnessed small squads leveraging AI tools to drive meaningful progress across several important initiatives, including
- Source 3:
Investor Update: Snap's Path to Net Income Profitability (Exhibit 99.2 to Form 8-K)
Supporting excerpts (2)
mapping critical work to a combination of highly focused teams and increasingly capable AI agents
1M+ 65%+ 7,500+ questions/month answered by support of new code generated by AI bugs found by code review agent agent
- Source 4:
Snap slashes 1,000 jobs in AI-driven efficiency push
Supporting excerpts (4)
with over 65% of new code reportedly AI-generated and some gains in ads and infrastructure
When the financial imperative precedes the capability, the AI narrative starts to look more like cover than cause
said Alan Cohen, a data analyst at RationalFX
This is where companies falsely attribute job cuts to
- Source 5:
CodePal: How Snap Built an AI Code Reviewer for the Age of AI-Written Code
Supporting excerpts (49)
At Snap, engineers use tools like Cursor and Claude Code daily, and the impact on velocity has been real.
Year-to-date, our merged (Pull Request) PR rate is up 60%.
We were seeing more PRs, larger PRs, and reviewers stretched thinner across all of these additional reviews. As a result, review queues backed up, and merge times grew.
Today, CodePal reviews 90% of all PRs at Snap, even before a human reviews them.
We evaluated several vendor solutions before deciding to build in-house.
First, integration depth: Snap's engineering infrastructure is extensive and deeply interconnected.
Our build systems, deployment pipelines and internal tooling all have specific requirements that off-the-shelf tools can't easily accommodate.
where consistent, thorough reviews were essential
Second, speed: We shipped a working end-to-end demo in two weeks. A vendor procurement cycle hadn't even finished.
For a growing portion of reviews, CodePal also reaches across repository boundaries via Code Search, an internal semantic search system covering Snap's full codebase.
Before a function signature change merges, CodePal can identify the downstream callers that would break, even when they live in a different repo than the one the PR touches.
CodePal looks for issues that aren't typically caught by compilation or test suites: logic errors, null pointer risks, race conditions, resource leaks, error handling gaps, type mismatches, edge cases, and state management problems.
CodePal generates semantic diff summaries that explain what a PR does and why
The first pass parses the repository with tree-sitter to build a symbol-to-file index. The second pass analyzes the diff, extracts referenced symbols, looks them up in the index, and scores files by symbol overlap.
This scoring selects the top N most relevant files within the token budget.
Every review runs entirely in memory, against the GitHub Enterprise (GHE) API.
We never check out a working copy, never write source to disk, and never hold a long-lived mirror of any repository.
Cloning Snap's largest repos is slow and expensive in both time and storage.
Three child workflows, which handle code review, summary generation, and description generation, then all read from this single, shared context.
The model finds real bugs, but it also makes things up, contradicts itself between runs, and produces wildly different findings depending on the random seed.
Two passes run in parallel from the start. They use the same model but different sampling parameters.
When both bootstrap passes complete, the supervisor compares their findings. If they agree, pass three's work is immediately discarded. If they disagree, the work it has already done counts toward the final findings.
From pass three onward, the moment a pass finds something the supervisor has not seen before, the next pass launches without waiting for the current one to finish.
For instance, it checks that all symbols cited in a finding are actually present in the provided context, greatly reducing the risk of a finding being posted based on a model hallucination.
CodePal launched as an opt-in experiment, analyzing PRs for potential bugs and security vulnerabilities. Adoption began cautiously at 9% of PRs, but quickly grew as we made reviews mandatory in a handful of repositories
CodePal was being used voluntarily across 300 repositories with >70% positive sentiment.
When we started to auto opt-in teams
Within a single quarter, we went from virtually no AI-reviewed PRs to over 90% of all PRs at Snap having a CodePal review.
Three flaws stood out: reviews were inconsistent across runs, CodePal would sometimes hallucinate intent by assuming the wrong thing about what the code was supposed to do, and we had no process to validate changes before they rolled out.
We relied on user feedback, which was too slow.
We formed a ground truth dataset from real engineer feedback
as well as a process to AB test all new CodePal changes
Four investments drove the recall improvements:
Broader detection scope: The scope expanded from 8 bug categories to 12.
Incremental reviews: Each new commit triggers a focused re-review with auto-resolution of findings whose files have left the diff.
Our recall rate of true positives has increased from 30% to 80%, the rate of false positives in our golden dataset has dropped to 0% (measured on the held-out golden dataset, not on live traffic) and we're also finding 75% more bugs now with a positive rating than we were previously, with user sentiment sitting at 80% positive.
However, in almost all cases where a missed bug was reported to us, the bigger issue was with the context supplied to the model.
In Snap's biggest repositories, which include hundreds of contributors, intricate internal libraries, and years of accumulated conventions, generic reviews start generating noise.
Teams that invest in .codepal.yaml configuration and per-path instructions see dramatically better results.
Engineers can vote on every CodePal comment with thumbs up or thumbs down.
This live user feedback, along with findings that are merged without being addressed (i.e., ignored) and findings that are fixed by the author, is aggregated into our ground truth dataset
AI review doesn't yet replace human review, it reshapes it.
frees them to focus on the things that actually require human judgment: architecture, long-term maintainability, product implications
CodePal performed >200k reviews across 90% of all PRs over the last 4 months
CodePal reviews complete within 10 minutes while the median time to wait for the first human review is ~5 hours.
Reviews cost on average ~$0.40 per review.
but every PR still requires a final engineering approval
A typical review touches a handful of API calls and a few hundred KB of source, regardless of repo size.
In aggregate, this loop produces reviews that are more thorough than a single pass and more consistent across runs than any single model call could be. It costs more compute
- Source 6:
Casper: Snap's fleet of friendly AI teammates
Supporting excerpts (47)
Casper is our fleet of autonomous remote agents able to code, review A/B studies, search info, create and manage project tasks, look up realtime metrics, and query data, instantly within Slack via DM, channels, or triggers along with a dedicated web console.
They take a task, spin up in an isolated environment, implement the smallest safe change, validate it, and produce a pull request
Today, this AI agent system is producing thousands of mergeable PRs each week across Snap's engineering organization.
Snap's codebase is massive, spanning thousands of services, multiple languages, and deeply interconnected systems
It's not the kind of codebase where a generic off-the-shelf AI agent thrives out of the box.
We also recognized that one of our most constrained resources is engineer attention.
Even well-scoped tasks, fixing a flaky test, addressing a lint violation, bumping a dependency, implementing a straightforward feature from a well-written ticket, consume valuable cognitive bandwidth.
We evaluated if we should build or buy a coding agent and ultimately decided that vendor solutions solved some, but not all of the things we needed.
We needed interoperability within all of our internal services. We needed a tight integration with our CodePal and CodeSearch agents.
Agent identity, security, and reliability for access and resource controls were all critical requirements for us to be able to have full control over. We needed it to be agnostic to the harness and model families.
Lastly, we wanted to have control over the product UX so we could cater it to Snap specific workflows and maximize the efficiency gains.
Casper runs the same agentic loop as a local tool like Claude Code or Codex.
running remotely, under a managed identity, already wired into Snap's systems
It's autonomous, safely running in a disposable sandbox, Casper skips per-command approvals.
here the blast radius is a throwaway container
SSH keys, or credentials. Casper runs under a narrow identity and reaches source control only through a trusted controller, with every action attributable to that engineer for accountability.
Zero setup: Already connected to Snap's systems via the MCP Gateway, with nothing to install.
Other systems can call Casper: a pipeline, a service, a scheduled job.
Gather context to read the Slack thread, Jira ticket, linked documents, repo-level rule files, and any relevant history.
Plan and implement the change that addresses the task, asking the human for approval where needed.
Run validation to execute configured checks, tests, and build the changes to verify the change works.
This is where engineers can optionally join the session and update the instructions to fine-tune the output.
Invoke CodePal so the PR is automatically reviewed by AI
Casper can help address any flagged issues before the PR is presented for human review
Our target is mergeable PRs to ensure Casper is helping us to achieve outcomes and not just performing activities.
DM it, or tag @casper in a channel, with a plain-language task.
replies in a thread with live progress, and delivers the PR back into the same conversation
it reads the prior messages as context instead of requiring them to re-explain
therefore Casper can only do what that user can
The portal is also the system of record: every session, whether started here or in Slack, shows up with its details, PR links, and how it was triggered.
on a schedule (a nightly cleanup, a weekly dependency bump), or whenever activity happens in a specific Slack channel
When a task arrives, from a Slack mention, a Jira label, the portal, or the API Casper starts a durable session, spins up a fresh, isolated sandbox, and loads the Casper Agent selected for the job.
pulls in the repository
reaches across Snap through Code Search, the retrieval layer covered in Part 2
It is the same context substrate CodePal uses
Engineers can share custom agent templates (prompt, tools, runtime image, plugins)
Each one demands context-switching, environment setup, and review cycles.
Code Search lets Casper find ownership, reuse established patterns, and inspect downstream callers that live in other repositories.
Builds, tests, and linters are part of the loop, not an afterthought. When something fails, Casper reads the output, revises the change, and runs it again
When the change is ready, Casper pushes a casper/-prefixed branch and opens a normal pull request. CodePal reviews it immediately, and Casper can address those findings before a human ever reviews the PR.
In both cases, the pull request follows the same review and approval process as any other change.
The process editing code and running commands does not hold raw source-control credentials. A separate trusted controller exposes checkout, Code Search, push, and pull-request operations through a narrow tool interface
Model and cost: Pick the model that best balances quality, speed, and cost, and attribute usage to the right team.
Since GA last quarter, we have seen hundreds of custom Casper agents being created for on-call agents, summarizing project statuses, audit evidence checking, constant test expansions, and more.
which is the standardized interface into all of the MCPs and their tools available at Snap. Once a new MCP is available through gateway, every Casper agent can use it, no per-agent, per-tool integration work.
each downstream system enforces that user
The gateway is a single, auditable choke point where access is enforced and every tool call is attributable to the user who triggered it
- Source 7:
Snap: Agentic AI Software Development at Scale
Supporting excerpts (35)
Saral Jain is SVP, Head of Engineering and CIO at Snap Inc.
At Snap, more than 90% of all code is written by AI agents right now.
Our code reviewer, CodePal, reviews 90% of all of this code within the first 5 to 10 minutes, and it has found tens of thousands of bugs in new code that is being written.
Casper, which is our remote coding agent, is generating thousands of PRs every month.
the number of agents is thousands
we have created these 14 agents that cover almost 90% of what an engineer's day-to-day workflow looks like
Overall, Snap has roughly 5,000 employees.
That is our way of saying the safe way should be the easy way so that people actually use these managed blessed agents, essentially.
the humans will absolutely take a final look at these PRs being generated before anything gets merged into production
Casper is listening in on the Slack conversation or on the conversation that is happening in Jira or anywhere else in our internal systems.
now our agents have 60 times more traffic on those code search systems internally than humans
Our per-engineer commits are up by 75% year over year while reducing the number of severe outages by 57%.
We actually definitely start with an agent registry. We also have inputs and outputs of what an agent should be able to do and what an agent actually does. And most importantly, we have audit trails.
And all of our agents go through a central MCP gateway, essentially, and a central MCP platform.
widely used agents go through severe privacy and security reviews. Our security team classifies the risk tiering as well.
Then we do code reviews for what the prompts of these agents are
we want more than 50% of our investment actually goes into the guardrails
It actually helps us move faster because people have confidence in the system now.
invest first in the guardrails, not in the building
An internal dashboard that is used by a few employees that does not have access to sensitive data, we can unleash AI agents and it can actually be 100% AI-generated with very little human reviews, maybe even auto-approved in some cases.
But when a change is privacy-sensitive, when it goes out to a billion people, we do need to make sure humans are ultimately accountable understand the spec, understand the code, and are able to vouch for the outcomes of this code.
Whether it was drafted by AI or human is immaterial. It's the ultimate ownership.
AI agents can be wrong in not obvious ways. They can be wrong in very subtle ways, and they can be wrong very confidently.
I worry that over a period of time it would be easy for people to ship changes they do not understand
When more code gets generated, more vulnerabilities will be present.
we do not give our CodePal access to our Oracle financial data, because it does not need that data
Like if you are going to make a change that is going to change 20 services, then you will need to talk to owners of those 20 services
But the coordination tax between teams is too high.
convince them to make the change, get it above the line of their roadmap
12 months back, we were using AI as a glorified autocomplete.
We use frontier models from the big labs. We also experiment with open-source models.
we don't try to obsess about activity metrics, things like number of PRs or number of tokens
Are we shipping better software faster? That is the most important thing to me as an engineering leader and are we improving on costs?
Are we having less number of outages?
we have a bunch of guardrails as well in terms of testing and rollbacks to ensure that we limit any bad blast radius from these changes
- Source 8:
Snap Inc. Q2 2026 prepared remarks (Exhibit 99.2 to Form 8-K)
Supporting excerpts (2)
In Q2, code commits per engineer increased 75% year-over-year, while major reliability issues declined 57%.
Our internal AI code reviewer now reviews 90% of pull requests across Snap and has saved an estimated 30,000 hours of code-review time.
- Source 9:
Snap Inc. Q3 2026 prepared remarks (Exhibit 99.2 to Form 8-K)
Supporting excerpts (1)
For example, in Q3, our engineering teams more than doubled the number of merged pull requests year-over-year, while the defect rate per merged pull request declined over 71%.
- Source 10:
Minions: Stripe's one-shot, end-to-end coding agents, Part 2
Supporting excerpts (2)
minions are a homegrown unattended agentic coding flow at Stripe
Over 1,300 Stripe pull requests (up from 1,000 as of Part 1) merged each week are completely minion-produced, human-reviewed, but containing no human-written code.
- Source 11:
1,500+ PRs Later: Spotify's Journey with Our Background Coding Agent (Honk, Part 1)
Supporting excerpts (2)
By exposing our background coding agent via MCP, Spotifiers can now kick off coding agent tasks from both Slack and GitHub Enterprise.
To date, our agents have generated more than 1,500 pull requests that teams across Spotify have merged into our production codebase.
Comments
Start the conversation.
Invited members of the library comment here. Sign in to join the conversation.