Avoiding slop grenades in AI pull requests

Keeping agent-generated changes reviewable in an established codebase.

A grenade explodes into a barrage of pages bearing AI filler phrases while a person shields their head in a trench.

You give an agent a feature specification. It implements the feature, fixes a bug it finds along the way, refactors some nearby code, and adds optimizations for scenarios you never asked it to support. You send the result for review: 75 files changed, 3,000 lines of code changed.

Fictional PR titled ‘Do a bunch of stuff’. Its exaggerated AI-written description lists file changes, failed attempts, an unrelated bug fix, refactors, speculative scaling, and tests not run. Adds 2,300 lines, removes 700, and changes 75 files.

Suppose you spent five minutes asking for that work. Your colleague now spends three hours figuring out what happened, which changes belong, and whether the feature works. Those hours are part of delivering the feature. You’ve handed them to someone else.

At work, we’ve started calling this kind of handoff a “slop grenade”: AI-generated content passed to another person without the author taking the time to read, refine, or verify it.

If you work on an established codebase where a team maintains a system with existing users, conventions, and years of decisions behind it, you might already have been a victim of a slop grenade.

The reality is that code is becoming cheap. The bottleneck has shifted from writing it to getting people aligned, whether that’s reviewing a PR, discussing a technical design, or coordinating a project across teams.

That makes optimizing for alignment an essential part of the work. Your job is to prepare each PR, document, or meeting with care, focus, and empathy for the people on the other end.

Let’s focus on how to use agents to prepare pull requests that are easier for your teammates to understand and review. These practices have helped me get agentic PRs merged and features shipped to production.

If it doesn’t spark joy, toss it away

Code is cheap, but weak specs are not. Get your agent on the right track from the start. The more care you put into the specification, the better its chances of building what you actually need.

As agents become more capable and autonomous, they can carry a mistaken assumption through more of the work before you review it. An ambiguous or incomplete prompt can leave an entire feature built around an abstraction that doesn’t fit the problem.

Be explicit about what you’re building, who it’s for, and what belongs in the work. Define what is out of scope too. Leave that scope too broad, and a simple bug fix can become a major refactor PR you never wanted.

For example, a spec for a new internal upload API could look like this:

Implement a new internal upload API

Required behavior

Allow internal clients to upload PDF files up to 15 MB. Reject unsupported files and uploads above the size limit.

Constraints

Reuse the existing authentication middleware. Use the legacy transport layer by default, with transport selection behind a feature toggle so we can enable the new transport when it is ready.

Operating expectations

Include the endpoint in the existing internal SLO. Expect an average of 3,000 requests per minute and a peak of 300 concurrent requests.

Out of scope

Implementing the new transport layer is a separate ticket. This change prepares its rollout through the feature toggle.

Do not refactor the existing API. We’ll deprecate it in a separate PR once the new API is fully rolled out.

API-128 Feature · ProductP0 priority

Once the agent has a first draft ready, it’s time to review and refine the changes.

As the author, you have the requirements, constraints, and reasons for the change fresh in your mind. It’s cheaper for you to catch inconsistencies now than for a reviewer who first has to build that context and understand why the PR exists.

Be your agent’s toughest reviewer. Challenge design decisions, new abstractions, and unrelated interface changes. If something feels out of place, decide whether it belongs in another PR or should be removed. Assume each change is unnecessary until you can justify keeping it.

Agents often optimize for scenarios that aren’t realistic for the software you’re building. You might be tempted to keep those additions as safeguards for the future, but every addition is more code to maintain, test, and change as your feature evolves. Complexity always comes at a cost.

Before asking for review, verify that the result meets the acceptance criteria. Read the tests as critically as the implementation. A passing test that checks the wrong behavior can be worse than no test at all. It can make an incorrect implementation look verified. Run the relevant checks, investigate failures, and be explicit about anything still failing or unverified.

Turn the remaining work into smaller reviews

After removing unnecessary code, the diff can still contain several useful changes. The bug fix and refactor from the opening example may be worth keeping, but each asks the reviewer to understand something different.

If the feature depends on the bug fix, put the fix in a base PR and stack the feature on top. A prerequisite refactor can go in another PR. Work that can stand on its own can be reviewed in parallel. This lets the reviewer assess the fix or refactor on its own terms before looking at the product change that uses it.

Split the work before review
One large pull request becomes four smaller reviewsOne undivided PR block gathers comments and rejection marks. Its bug fix, class refactor, foundational work, and feature appear one at a time, then move apart in place. Bug fix and refactor become parallel base PRs, foundational work sits above them, and the feature sits at the top. The comments and combined counter disappear. Each base PR is approved, its connector draws upward, and the next PR is approved after the connection arrives. Illustrative counts sum to 2,450 additions and 550 removals.One huge PRFour focused PRsImplement new upload APILet’s delve into this game-changing update!src/upload.ts: implemented a robust, seamless solution.Attempt 1 failed. Attempt 2: rewrote the whole module.auth.ts: proactively fixed an unrelated bug.UploadService.ts: refactored for limitless scalability.transport.ts: added a future-proof abstraction layer.Also optimized for millions of hypothetical users.Tests not run. All concerns holistically addressed!+2,450−55075 filesBug fix+200−50Class refactor+950−250Foundational work+780−170Upload API+520−80One large pull request becomes four smaller reviewsOne undivided PR gathers comments and rejection marks. Its four parts appear one at a time, then move apart into a stack: bug fix and class refactor in parallel, foundational work above them, and feature at the top. The combined counter disappears and smaller counts and approval checks appear.One huge PRFour focused PRsImplement new upload APILet’s delve into this game-changing update!src/upload.ts: implemented a robust,seamless solution.Attempt 1 failed. Attempt 2: rewrotethe whole module.auth.ts: proactively fixed an unrelated bug.UploadService.ts: refactored forlimitless scalability.transport.ts: added a future-proofabstraction layer.Also optimized for millions of hypothetical users.Tests not run. All concerns holistically addressed!+2,450−55075 filesBug fix+200−50Class refactor+950−250Foundational work+780−170Upload API+520−80

The feature itself may still be too large for one review. Split it into modules across dependent or parallel PRs, then connect them in a later change. Each intermediate state needs to work and be testable. Keep unfinished behavior behind a feature flag where appropriate, preserve compatibility with existing callers, and maintain a shared explanation of how the pieces fit together.

Build behind a feature flag
Four tested pull requests enable the upload APIA separate availability flag keeps the new upload API off while the work is reviewed. First add the flag, off by default. PDF validation and the upload handler can then be built and reviewed in parallel, accepting PDFs up to 15 MB and reusing the legacy transport. Finally connect the endpoint through the existing authentication middleware. Every PR includes tests. Approval checks and upward arrows show the dependencies. Enable the new API only after all four PRs are approved.New upload APIFLAG OFFFLAG ONAdd API flagOff by default+65−0PDF validationPDF only · up to 15 MB+180−12Upload handlerReuse legacy transport+240−35Connect endpointExisting auth middleware+140−8Four tested pull requests enable the upload APIA separate availability flag keeps the new upload API off while the work is reviewed. First add the flag, off by default. PDF validation and the upload handler can then be built and reviewed in parallel, accepting PDFs up to 15 MB and reusing the legacy transport. Finally connect the endpoint through the existing authentication middleware. Every PR includes tests. Approval checks and upward arrows show the dependencies. Enable the new API only after all four PRs are approved.New upload APIFLAG OFFFLAG ONAdd API flagOff by default+65−0PDF validationPDF only · up to 15 MB+180−12Upload handlerReuse legacy transport+240−35Connect endpointExisting auth middleware+140−8

Your agent is more than capable of solving all these issues in a single PR, but remember what you’re optimizing for: alignment. Reviewers are more likely to understand and approve changes with a narrow scope.

The same principle helps with broad interface migrations. Changing the interface of a heavily used method might touch thousands of lines of code.

Introduce the new interface alongside the old one, keeping the old interface in place until every caller has migrated. Then add a codemod, a script that updates callers to use the new interface. Add tests covering both the interface and the transformation across real usage patterns.

Review the migration in stages
One large interface migration becomes six focused pull requestsOne undivided pull request changes 30,000 lines across 700 files to introduce a new interface for a widely used method. Its six parts move into four tiers. Read bottom to top: add the new interface and tests; add the codemod and tests; apply first, second, and third batches in parallel; remove the codemod and deprecated interface after all batches finish. The individual additions and removals total 30,000 changed lines. Approvals send connectors upward, branching into the three parallel batches and joining before cleanup. Counts are illustrative; files can recur between PRs.One huge migration PRSix focused PRsNew interface+ every callerA seamless, future-proof update.Modernize the entire codebase.30,000 lines changed700 files changed1 · Add interface + tests+600−02 · Add codemod + tests+400−03 · First batch+4,800−4,8004 · Second batch+4,800−4,8005 · Third batch+4,700−4,7006 · Drop codemod + old API+0−400Three batches reviewed in parallelOne large interface migration becomes six focused pull requestsOne undivided pull request changes 30,000 lines across 700 files to introduce a new interface for a widely used method. Its six parts move into four tiers. Read bottom to top: add the new interface and tests; add the codemod and tests; apply first, second, and third batches in parallel; remove the codemod and deprecated interface after all batches finish. The individual additions and removals total 30,000 changed lines. Approvals send connectors upward, branching into the three parallel batches and joining before cleanup. Counts are illustrative; files can recur between PRs.One huge migration PRSix focused PRsNew interface+ every callerA seamless, future-proof update.Modernize the entire codebase.30,000 lines changed700 files changed1 · Add interface + tests+600−02 · Add codemod + tests+400−0Batch 1+4.8k−4.8kBatch 2+4.8k−4.8kBatch 3+4.7k−4.7k6 · Drop codemod + old API+0−400Three batches reviewed in parallel

Once the transformation has been reviewed, apply it in manageable batches. Each batch applies the same reviewed transformation, with edge cases already tested in the codemod PR. CI should give reviewers enough confidence to approve. After all callers have migrated, remove the deprecated interface and the codemod.

Build trust with your reviewers

You’ve prepared the code and spent time breaking it into focused, reviewable pieces. Now make sure you communicate that work well.

PR descriptions are a powerful tool, but agents without proper guidance often fill them with references to what changed and where. That information is already in the diff, so repeating it adds noise. Focus the description on raising reviewers’ confidence without overburdening them.

Test coverage shouldn’t be your only resource. A demo can save a reviewer from setting up an entire environment to try your feature. Stress test results prove it performs under load. A diagram can show how the feature interacts with the existing system. A supporting document captures prior alignment with leadership.

Illustrated Upload API pull request with Demo, Diagram, and Load test attachments, followed by three positive review reactions: ‘10/10, would review again.’, ‘LGTM’ with an approval checkmark, and a chef’s kiss GIF.

The effort you put into providing the right context shortens the feedback loop with your reviewers. Do this consistently and you build their trust in your work. They’re more likely to pick up your PRs, contribute to the discussion, and help move the change forward.

Does this apply to you?

This article might not be for you. Maybe you’re working on a greenfield project where detailed specs guide a swarm of agents delivering hundreds of PRs a day, with little human review. Or you’re vibe coding an app with a few friends, and getting to market quickly is the priority. In those settings, you can ignore much of this advice.

But many of us still work in large codebases with established boundaries, where alignment is essential to getting changes shipped. That’s the context behind these practices, and where I hope you’ll find them useful.

With how quickly AI is changing, I might be doing parts of this differently in a few months. Right now, these practices are helping me get large refactors and complex features moving in a large organization, with agents involved throughout the workflow.