Large software organizations face a persistent challenge: managing codebase-wide changes that span hundreds or thousands of repositories. Each change—whether a security patch, library migration, or deprecated API replacement—must be applied consistently across diverse codebases, where repositories differ in structure, dependencies, and context.
What Happened
Sourcegraph has launched Agentic Batch Changes, a new capability built on its existing Batch Changes and Deep Search technologies. This feature allows a single engineer to describe a change in plain language, after which an AI agent automatically identifies where the change applies, generates targeted pull requests, and tracks their status until merge. The change is not a simple text search and replace; it adapts to repository differences and responds to failures in real time.
Key Facts
- Agentic Batch Changes enables one engineer to orchestrate changes across thousands of repositories.
- It has already been used in real-world scenarios at companies like Mercari and Canva, including security remediation and library migrations.
- During beta testing, customers merged nearly 1,000 changesets, with one single change affecting over 2,200 pull requests.
- It supports use cases such as dependency upgrades, framework rollouts, CI pipeline modernization, and end-of-life deadline handling.
- It uses scripts for most operations—because repetitive changes are more efficiently handled via automation than repeated manual coding.
- It only charges for changes that are actually merged into the codebase, not for failed attempts or generated diffs.
How It Works
Agentic Batch Changes operates in stages. First, the user describes a change in natural language—such as ‘update the environment variable handling to prevent injection attacks.’ The system then uses Deep Search to analyze the entire indexed codebase, identifying all repositories where the change is relevant.
Next, it constructs a plan, testing the change in a single repository to validate its behavior. If the change works, it proceeds to roll it out across the rest of the codebase. Where repositories differ, the agent adapts the change to fit local context. If a pull request fails due to a CI error, the agent detects the failure and adjusts its approach—either by modifying the change or pausing until a human review is available.
Throughout the process, users can monitor the status of each pull request in real time. When a decision point arises—such as a code change that might affect business logic—the agent pauses and hands the task to a coding agent with specific context, allowing human judgment where needed. Most operations are handled by script generation, which is far more efficient than repeating the same change manually across dozens or hundreds of repositories.
Why It Matters
Before Agentic Batch Changes, managing large-scale code updates required either massive pull requests or spreadsheets to track dozens of small changes. These approaches introduced risk: incomplete rollouts, inconsistent implementations, and difficulty in verifying coverage.
Now, engineering teams can apply changes at scale with confidence. At Mercari, a team lead used the tool to identify and patch a GitHub Actions environment-variable injection vulnerability across 80 repositories. At Canva, the system raised and tracked over 50 pull requests for a library migration, eliminating the need for oversized PRs or manual tracking.
By enabling engineers to describe changes in plain language and see them executed across the codebase, Agentic Batch Changes reduces cognitive load and improves accuracy. It also aligns with broader trends in AI-driven software engineering, where agents are no longer just writing code in isolation but are orchestrating complex workflows across entire systems.
For enterprises managing monorepos or distributed codebases, this capability represents a significant shift in how engineering teams maintain and evolve software. It supports faster, safer, and more transparent rollouts of updates—critical as codebases grow in complexity and scale.
Limitations and Open Questions
While Agentic Batch Changes is powerful, it is not a panacea. It relies on the quality and completeness of the codebase’s indexing. If a repository is poorly indexed or contains outdated or fragmented documentation, the agent may miss relevant contexts or generate incorrect changes.
Moreover, it still requires human oversight for critical decisions. The agent pauses when judgment is needed, but the final approval remains with a human engineer. This introduces a dependency on human review, which may slow down some workflows despite the automation.
Another limitation is scope: the tool is designed for changes that can be expressed in plain language and are repeatable across repositories. Complex, interdependent changes—such as those involving system architecture or data flow—may still require human intervention or a different approach.
What to Watch Next
As the technology matures, organizations will likely explore new use cases beyond security and library updates. Potential applications may include automated compliance checks, configuration drift detection, or even AI-driven refactoring of legacy code.
Sourcegraph has also introduced outcome-based pricing—customers pay only for changes that are actually merged, not for AI compute usage or attempts. This model reflects confidence in the tool’s reliability and provides a clear financial justification for its use. Learn more about this pricing model.
For a deeper understanding of how AI is transforming software maintenance, see The Autonomous Codebase: A New Frontier in Software Maintenance.
Additionally, similar AI-driven automation is already being used in other areas, such as automating security triage and enhancing coding efficiency.
Agentic Batch Changes is available today for Sourcegraph Cloud customers, on by default. Read the original source.

