A novel approach to using AI coding agents introduces backpressure mechanisms that allow agents to validate their own work before human intervention, potentially revolutionizing how developers collaborate with AI systems.
In the rapidly evolving landscape of AI-assisted software development, a critical challenge has emerged: how to effectively leverage coding agents without sacrificing code quality or overwhelming human reviewers. Lucas Costa, a developer and researcher, has proposed an innovative solution centered around the concept of backpressure—a mechanism borrowed from systems engineering that could fundamentally change how we interact with AI coding assistants.
The current approaches to using AI coding agents present a stark dichotomy. On one hand, we have the "let it run wild" approach where developers allow LLMs to generate code with minimal oversight. This method is fast but often produces buggy, confusing changes that result in a flood of pull requests humans cannot review effectively. As Costa notes, "This is fast, exciting, and stupid. It leads to bugs, confused changes, and a flood of PRs that humans cannot review quickly enough, at least not without eventually lowering their standards and merging things they do not really understand."
On the other hand, treating AI agents as glorified autocomplete—requiring human review of every tiny step—sacrifices the primary benefit of delegation. "If you still have to steer every minor decision, you have not delegated much," Costa argues.
The third approach, which Costa advocates, focuses on building systems that enable AI agents to validate more of their own work before human intervention. "The goal is to make longer unattended sessions safe enough to be useful without fully removing the human from the loop," Costa explains. "It should also reduce the number of low-quality PRs your teammates have to review for details the agent should have caught itself."

Understanding Backpressure in Software Development
In systems engineering, backpressure refers to the mechanism by which a downstream component signals upstream that it can't accept more work, forcing the producer to slow down, buffer, or shed load. "Whenever there's no backpressure, the producer is free to generate work at will, and the consumer is forced to absorb the mismatch," Costa writes. "Then, the consumer either falls behind, breaks under the load, or speeds up by cutting corners."
In traditional software development, we've already implemented various forms of backpressure. Automated test suites serve as a fundamental backpressure mechanism, preventing developers from submitting code with failing tests. "Ideally, your colleagues shouldn't even review a PR until all tests are green," Costa notes. "In that case, the test suite is the backpressure mechanism for a human to clean up their code before asking for a review."
Type systems represent another powerful form of backpressure. Costa illustrates this with the evolution from JavaScript to TypeScript: "Before TypeScript, the only way to catch the bug before production was for a reviewer to follow the prop, follow the callback, check the caller, check the caller's caller, and hope the mismatch was visible in the diff."

The AI Coding Dilemma
The challenge becomes more complex when the producer is an LLM generating code faster than humans can review. "With no automated backpressure, the human is the backpressure—manually reviewing the agent's output and feeding corrections back every cycle," Costa observes. "Often, for extra safety, we install a review bot to check the first AI's code. Then, we copy the bot's feedback back into the coding agent. That way, we have ironically promoted ourselves to an expensive clipboard doing the mechanical work between two machines."
This inefficient process motivated Costa to develop a comprehensive backpressure system for AI coding agents. "The next step for AI-aided software development is to stop making humans the default backpressure in the AI loop," he asserts. "We need tests that fail early, types that push back, benchmarks that catch regressions, and review agents that send bad patches back before they become a human's problem. That machinery is what makes delegation possible, and frees up our time to focus on higher-level feedback and design decisions instead of low-level correctness and quality issues."

Implementing Backpressure in Practice
Costa has developed a multi-layered backpressure system that incorporates various validation mechanisms throughout the AI coding process. These mechanisms operate at different stages, ensuring comprehensive code quality before human review.
1. Linting, Testing, and Verification Scripts
The foundation of Costa's backpressure system consists of standard quality checks: linting, testing, and verification scripts. "If your project already has a test suite and a linter, you can start using them as backpressure mechanisms right away," he explains. "In fact, Claude already picks up tests most of the time, but as it goes along, it sometimes forgets to keep them green."
Crucially, Costa emphasizes running these checks in each iteration, not just at the end. "By running the checks in each iteration, I forced the model to confront the consumer's expectations more frequently, which made it more likely to catch issues early and fix them before moving on to the next step."
2. Manual Testing with cURL and Browsers
Recognizing the limitations of automated testing, Costa incorporated manual testing into the backpressure system. "Automated tests are great for catching a wide range of issues, but they can't catch everything, and they certainly aren't as representative as clicking around in an actual browser or running cURL commands against a real API," he acknowledges.
This required teaching the AI agent how to run applications locally, set up databases, and troubleshoot common issues. "Given manual testing is slower than automated testing, you can see that I told the model to use it sparingly. In practice, that usually means near the end of the task," Costa notes.

3. Benchmarking
For performance-sensitive applications, Costa added benchmarking as a backpressure mechanism. "Writing that into the prompt was easy, but making the benchmarking suite easy to run and interpret was a bit more work," he admits. "Still, I invested significant time in improving our benchmarking tools so that they would be easy to run with a single command, include multiple suites with different time budgets, and write structured output to disk and the console."
4. Review Agents
"Review agents were the most effective form of backpressure that I added to the loop, by far," Costa reports. These agents focus on quality aspects that automated checks might miss, such as readability, complexity, test coverage, and type safety.
The review agents operate at two levels: during each iteration of development and once more over the complete changeset after implementation. "This change added a new backpressure mechanism to both phases of the process, and significantly reduced the number of quality issues that slipped through to me," Costa explains.
5. Planning Phase Reviews
To address issues with the fundamental approach, Costa implemented a planning phase review. "Every backpressure mechanism I've covered so far targets the implementation phase. Those worked, but the model would sometimes pick the wrong approach from the start and it couldn't course-correct its way out of a bad foundation," he observes.
This phase occurs before any code is written, with a reviewer subagent evaluating the fundamental approach. "I was also careful to mention that this should be a lightweight plan, focused mostly on the approach and the architecture, and not on implementation details," Costa adds.

6. Visual Design Reviews
For front-end work, Costa experimented with visual design reviews as a backpressure mechanism. "This mechanism is especially relevant for front-end work, where the visual design is a critical aspect of the user experience," he suggests. "It's also an area where automated checks and even manual testing might not be sufficient to catch issues."
This involves taking screenshots and comparing them against design specifications in tools like Figma. "I'm honestly not sure about the efficacy of visual design reviews as a backpressure mechanism, but I think it's worth exploring," Costa admits.
7. Pull-Request Monitoring
The final layer of Costa's backpressure system monitors pull requests after they're opened. "Monitoring pull requests was probably the second most effective form of backpressure that I added to the loop, right after review agents," he states. "I added this mechanism after noticing that issues still slipped through even with the review agent in place. They were usually conflicts, failing CI checks, or comments from another reviewer agent on the PR."
The Complete Backpressure Loop
When combined, these mechanisms create a comprehensive backpressure system that guides AI agents through development while maintaining high code quality. The process flows through several distinct phases:
Planning Phase: The AI creates a lightweight plan focused on approach and architecture, which is reviewed and approved before any code is written.
Iteration Phase: The AI writes code in iterative cycles, with each patch passing through multiple backpressure gates:
- Linting checks
- Test execution
- Verification scripts
- Review agent feedback
- (For front-end) Visual design reviews
Post-Iteration Phase: After the main implementation is complete:
- Manual testing with actual browsers and cURL
- Benchmarking (for performance-sensitive applications)
- Final review agent assessment of the complete changeset
PR Monitoring Phase: After opening the pull request, the system monitors for 24 hours to address any new issues that emerge.
Making Backpressure Accessible
To make this approach more widely accessible, Costa has packaged his backpressure system into a skill called @lucasfcosta/backpressured. "You can install this skill in your terminal using npx @lucasfcosta/backpressured," he explains. "After installing it, run /backpressured in Claude to start the loop — or just ask Claude to use the backpressured skill."
The skill implements the complete backpressure loop described in the article, allowing developers to leverage these mechanisms without having to build them from scratch. "You can also customize the checks and the iteration process by adding a BACKPRESSURE.md file to your project," Costa adds.
Future Directions and Implications
Looking ahead, Costa sees several promising avenues for development. "I'm not yet sure a SKILL.md is the correct way to package a workflow like this," he muses. "I wish there were an easier way of enforcing this workflow more natively in the model, without having to rely on a skill that can be ignored or bypassed."
He also plans to experiment with breaking down the review agent into multiple specialized agents. "I want to experiment with breaking down the review agent into multiple agents, each with a specific focus, like readability, complexity, testing, types, and so on," Costa explains. "That way, I can have more targeted feedback and make it easier for the model to understand and address specific issues."
Regardless of implementation details, Costa is confident that backpressure represents the future direction of software development. "We've spent decades moving the 'no' off humans. Now we have to do it again, for code that writes itself," he concludes. "My maxim: any system that relies on a human to catch the machine's mistakes will be limited by the human, not the machine."
The backpressure approach offers a compelling vision for AI-assisted development—one that maintains human oversight while maximizing the benefits of automation. By building systems that allow AI agents to validate their own work, we can create a more efficient, higher-quality software development process that leverages the strengths of both human and machine intelligence.
For developers interested in exploring this approach, the backpressured skill provides a ready-to-implement solution that embodies the principles outlined in Costa's work. As the field continues to evolve, we can expect to see more sophisticated implementations of these concepts becoming integral to the developer workflow.

Comments
Please log in or register to join the discussion