Free Intensive Nov 21–22Free 2-day hands-on Vibecoding Intensive on Nov 21–22 at 16:00 MSK (Sat–Sun) · Live Cohort 3 starts Nov 23Join Free →Cohort 3 (Nov 23)
ReleaseInsight · On RadarSourcegraph Blog→ original

Sourcegraph Releases a Migration Agent: At Mercari, It Found About 80 Vulnerable Repositories

Updating a library or closing a vulnerability across a hundred services is weeks of routine work: every repo is slightly different, and CI keeps failing. Sourcegraph has opened a beta of Agentic Batch Changes. You describe the migration in plain language, and the agent finds the repositories, edits them, and fixes failing CI. At Mercari, it found about 80 repositories with a vulnerability in GitHub Actions. An engineer approves every PR, so try it on a small, real migration first.

AI-processed from Sourcegraph Blog; edited by Hamidun News
Sourcegraph Releases a Migration Agent: At Mercari, It Found About 80 Vulnerable Repositories
Source: Sourcegraph Blog. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceSourcegraph Blog ↗
Editor-in-Chief
Key metric #1The beta is available to Sourcegraph Cloud customers and is free for now
Key metric #2The self-hosted version arrives on July 8, 2026, in Sourcegraph 7.5
Key metric #3For single-repository tasks, a regular coding agent is the better choice

Imagine a company with a hundred services. You need to update a dependency, change an API call, or close a vulnerability urgently before an audit. The edit itself takes five minutes. Then comes the hard part: finding every affected repository, accounting for the fact that each one is set up slightly differently, waiting for CI (automated builds and tests), dealing with red builds, and getting each pull request to a state where it can be merged. Sourcegraph is trying to automate exactly this part and has opened a public beta of Agentic Batch Changes. There are early results already: the Japanese marketplace Mercari used it to find about 80 repositories with a vulnerability in GitHub Actions.

How the agent works

It builds on Sourcegraph's existing Batch Changes engine and code search, including Deep Search. You describe the migration in plain language, for example "replace the deprecated call with the new one in all services." The agent then works in steps.

First, it searches for all repositories the change affects and assesses how the edit will impact each one. Then it builds a plan. Typically it tries the approach on a single repository first and, once the method works, rolls it out to the rest.

If the change can be described by a deterministic script, the agent writes a script. If it needs judgment, for example because code is structured differently across services, it brings in a coding agent that makes the edit with context in mind.

CI is a separate piece. When a build fails, the agent reads the logs, works out the cause, and adds a commit with a fix. You can show it how to pull logs from your system, whether BuildKite, GitHub Actions, or something else. The goal is set firmly: get the PR to a state where it passes checks and is ready for review, rather than leaving it red. If the agent gets stuck or needs a decision, it stops and asks. You can step in and change course at any time. An engineer ultimately approves each set of changes.

The Mercari example

Mercari used the agent in an experimental setup. Patrick Klitzke, the tech lead for Help Center, was searching the code for an environment-variable injection vulnerability in GitHub Actions. By his account, one query was enough to cover the Help Center frontend and backend. He then extended the search to all of the company's repositories and found about 80 potentially affected ones.

The most telling part is how the agent handled the differences. Mercari's repositories are similar but not identical. A plain script would have reduced the task to a text search and replace, without understanding how each string is used. The agent analyzed each repository separately. Canva also tested the product: it split mass changes by code owner within a Bazel monorepo.

Sourcegraph names several suitable scenarios:

  • Dependency updates with breaking changes between major versions
  • Closing CVEs: search finds every place using the vulnerable library, the agent ships the fixes, and Code Insights tracks progress
  • Refactors that need context rather than a regular expression: replacing deprecated APIs, removing ioutil in Go, dropping obsolete constructors in Java
  • Rolling out new libraries and authorization contracts, where each service needs its own edit
  • Modernizing CI configurations
  • Generating documentation and AGENTS.md files in each repository to prepare the codebase for agentic tools

Limitations and what to do about them

This is a public beta, and the company openly warns of rough edges. The product is designed for changes across many repositories at once. For a task in a single repository, Sourcegraph itself recommends a regular coding agent. The beta is available to Sourcegraph Cloud customers and usage is currently free. Support for the self-hosted version is promised for July 8, 2026, with the release of Sourcegraph 7.5.

What practitioners should take away: First, the bottleneck in large migrations often lies in orchestration: finding targets, waiting for CI, and manual fixes after red builds. That is the part now being handed to agents. Second, the rule that a human approves every PR looks sensible at this scale: the agent takes on the routine, and responsibility stays with the team. Third, the examples Sourcegraph cites are customer stories from the beta program, with no independent figures on the share of PRs successfully merged or the time saved.

So a reasonable first step is to take a small but real migration, such as a deprecated call or a shared CI template, and see how many repositories the agent gets to merge without your involvement. If you have dozens or hundreds of services and a growing tech-debt backlog, the product is worth trying while it is free.

Story

Key Questions Answered

How the agent works?

It builds on Sourcegraph's existing Batch Changes engine and code search, including Deep Search. You describe the migration in plain language, for example "replace the deprecated call with the new one in all services." The agent then works in steps. First, it searches for all repositories the change affects and assesses how the edit will impact each one. Then it builds a plan. Typically it tries the approach on a single repository first and, once the method works, rolls it out to the rest.

What are the key details on The Mercari example?

Mercari used the agent in an experimental setup. Patrick Klitzke, the tech lead for Help Center, was searching the code for an environment-variable injection vulnerability in GitHub Actions. By his account, one query was enough to cover the Help Center frontend and backend. He then extended the search to all of the company's repositories and found about 80 potentially affected ones. The most telling part is how the agent handled the differences. Mercari's repositories are similar but not identical.

What are the key details on Limitations and what to do about them?

This is a public beta, and the company openly warns of rough edges. The product is designed for changes across many repositories at once. For a task in a single repository, Sourcegraph itself recommends a regular coding agent. The beta is available to Sourcegraph Cloud customers and usage is currently free. Support for the self-hosted version is promised for July 8, 2026, with the release of Sourcegraph 7.5.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…