TL;DR: AI agents can accelerate analysis and bounded refactoring in a multi-million-line Go monolith, but they fail quickly when sequencing, invariants, or context are incomplete, according to 1Password. The deeper lesson is that production governance depends on explicit constraints, because agentic execution still breaks when intent must be inferred at runtime.
NHIMG editorial — based on content published by 1Password: AI agents in a production Go monolith
By the numbers:
- In practice, we saw something close to a 20-30% improvement.
Questions worth separating out
Q: How should teams govern AI agents that refactor production systems?
A: Teams should govern agentic refactoring as a constrained execution problem, not a free-form coding problem.
Q: Why do AI agents struggle with large production migrations?
A: They struggle because large migrations depend on ordering, invariants, and state awareness, while agents tend to optimise for local completion.
Q: What breaks when agents infer missing context during execution?
A: When agents infer missing context, the workflow starts to operate on assumptions instead of validated facts.
Practitioner guidance
- Define executable boundaries before enabling agentic work Require a written scope that names allowed files, allowed operations, rollback conditions, and explicit stop points before any agent touches production code.
- Convert migration tasks into deterministic manifests Use analyzers, manifests, and templated change sets so the agent edits a stable artefact instead of reasoning live over ambiguous system state.
- Treat sequencing as a hard control, not a suggestion Block any agent workflow that can backfill schema, rewrite write paths, or alter ownership boundaries without enforced ordering and validation gates.
What's in the full article
1Password's full blog covers the operational detail this post intentionally leaves for the source:
- The exact SSA-driven analysis workflow used to map code ownership and extraction order
- The playbook structure for running multiple agents in parallel with git worktrees
- The specific failure modes the team encountered during schema and service extraction work
- The migration pattern used to turn agent output into deterministic coding tasks
👉 Read 1Password's analysis of AI agentic refactoring in production systems →
AI agentic refactoring in production code: what breaks first?
Explore further