Failure Mode 1: Scope Creep
The agent starts migrating files that weren’t in the plan, or makes “improvements” beyond the migration scope. Prevention: strict file lists in the plan, and a verification step that checks the agent only modified files in its assigned batch.
Failure Mode 2: Semantic Drift
The agent changes the code structure correctly but subtly alters behavior. A function that used to return null now returns undefined. Tests pass because they don’t check for this distinction. Prevention: behavioral equivalence tests and mutation testing on the migrated code.
Failure Mode 3: Merge Conflicts
Parallel agents modify files that overlap, creating merge conflicts when PRs are combined. Prevention: the decomposition phase must ensure batches have non-overlapping file sets. When overlap is unavoidable, those files go into a sequential batch.
Key insight: Most migration failures happen in the planning phase, not the execution phase. A well-planned migration with clear scope, non-overlapping batches, and strong verification gates rarely fails. A poorly planned one fails regardless of how good the agent is.