Speaker Notes

Simon Willison: Engineering practices that make coding agents work - The Pragmatic Summit

Coding agents have transformed development workflows from writing code to directing and reviewing, but success relies heavily on TDD loops, rigorous sandboxing against prompt injection, and managing human cognitive fatigue.

The Pragmatic Engineer · 28:20 · YouTube ↗

Talk · 1 host and guest  Advanced · agent workflows and security strategy

Highlights

3 clips · 5 min of 28 min
    • Start every agent session by enforcing red-green test-driven development.
    • Agents will not write more code than needed if bound by tests.
    • Automated tests are effectively free with agents, making them non-optional.
    • The lethal trifecta combines private data access, malicious instructions, and an exfiltration vector.
    • Run coding agents in isolated cloud containers to limit the blast radius of prompt injection.
    • Avoid skipping local permissions unless operating inside a disposable sandbox.
    • Managing multiple concurrent agent workflows creates intense mental fatigue.
    • Cognitive exhaustion is a greater challenge than skill atrophy.
    • Human stamina acts as the ultimate bottleneck preventing infinite scaling of output.

Questions this video answers

10 · every answer cites the moment it was said
01 How do I shift my workflow to let coding agents write the code? 2 sources · 3:39

You transition from writing every line to directing the agent and carefully reviewing its outputs. As models have improved in reliability, some teams have even moved to policies where developers neither write nor read the code directly. However, trusting an agent requires finding ways to have it prove its work functions correctly.

02 Why should I enforce test-driven development when working with coding agents? 2 sources · 5:56

Starting sessions with red-green TDD instructions prevents agents from writing more code than necessary. Because automated tests are effectively free with AI, writing tests first dramatically increases the chances of getting working code. This approach eliminates the historical friction of TDD while keeping the agent focused on a minimal implementation.

03 How can I verify that an agent's code actually runs in the real world? 2 sources · 7:24

Passing an automated test suite does not guarantee that a server will successfully boot or function in practice. To catch these issues, instruct the agent to run the server in the background and exercise the API using curl commands. Tools like Showboat can even generate markdown documentation tracking these manual test results.

04 When is a language-agnostic conformance suite useful for an agent? 2 sources · 8:16

Conformance suites are ideal when an existing standard has detailed language-agnostic specifications and tests, such as Web Assembly or custom file upload requirements. You can give the test suite to a capable agent and instruct it to write code until all tests pass. This allows you to rapidly reverse engineer or implement complex standards across different projects.

05 Does it matter if a coding agent produces bad code quality? 2 sources · 10:20

For quick, single-page throwaway tools, code quality does not matter as long as it works. For long-term projects, accepting poor agent code is a choice, and you can explicitly prompt the agent to refactor messy sections. By taking the time to guide refactoring, you can end up with code quality that surpasses what you would write manually.

06 What is prompt injection and why is it dangerous for LLM-based software? 2 sources · 13:13

Prompt injection targets systems built on LLMs by exploiting their gullibility and tendency to follow instructions embedded in untrusted data. Unlike SQL injection, you cannot easily parameterize queries to separate data from instructions. If a malicious input contains hidden commands, an unconstrained agent might mistakenly execute them.

07 What is the lethal trifecta and how do I prevent it? 2 sources · 15:08

The lethal trifecta occurs when a model has access to private data, is exposed to malicious instructions, and possesses an external exfiltration vector. An example includes an assistant with email access forwarding sensitive data after reading a malicious message. The guaranteed solution is to cut off at least one leg of the trifecta, such as blocking external communication.

08 How do I securely sandbox coding agents to limit security risks? 2 sources · 16:20

Sandboxing limits damage if an agent receives malicious instructions or executes unsafe commands. Solutions like cloud-based web containers run agents in isolated virtual machines managed by third parties, protecting your local environment. Alternatively, using proper mocking prevents the dangerous practice of cloning production databases directly onto developer laptops.

09 How do I manage the mental exhaustion of operating multiple coding agents? 2 sources · 23:38

Running multiple coding agents simultaneously across different projects requires firing on all cylinders and leads to severe mental fatigue. Rotating between projects while waiting for agents helps maintain throughput, but human cognitive limits act as a natural bottleneck. Embracing this exhaustion means recognizing that you cannot indefinitely scale yourself to manage a thousand projects at once.

10 How are coding agents changing the demand for open source and component libraries? 2 sources · 27:08

Coding agents can write custom components and stitch together libraries on demand, which threatens traditional business models for paid component libraries. However, agents still heavily rely on the open source ecosystem for recommendations and underlying patterns. At the same time, maintainers face challenges with open source repositories being flooded by low-quality AI-generated contributions.

Section-by-section summary

6 parts

Coding agents shift developers from writing to reviewing

Modern developer workflows have evolved to the point where agents write the vast majority of code, shifting the developer's role to direction and review. While some teams experiment with reading no code at all, trust is earned through consistent output and verification rather than blind faith.

Enforcing test-driven development with coding agents

Asking agents to follow red-green test-driven development prevents them from writing bloated or incorrect code. Developers should provide the test framework command and instruct the agent to write tests first, making test maintenance practically free.

Understanding prompt injection and the lethal trifecta

Language models are inherently gullible and vulnerable to prompt injection attacks where malicious instructions hide inside untrusted data. The lethal trifecta occurs when a model accesses private data, processes untrusted inputs, and has an external communication vector.

Sandboxing agents to contain security risks

Running coding agents inside isolated cloud containers or virtual machines ensures that a prompt injection attack only compromises disposable infrastructure. Developers should avoid granting broad local permissions unless operating within a safely bounded environment.

Recent inflection points in model reliability

Recent model updates have crossed a threshold where agents can reliably one-shot complex tasks like adding RSS feeds or optimizing algorithms. This predictability allows developers to trust the output more readily without manual inspection of every line.

Mental exhaustion as the new engineering bottleneck

Managing multiple concurrent agent projects creates intense cognitive fatigue rather than skill atrophy. Human stamina acts as the ultimate constraint, preventing a single engineer from scaling output infinitely despite the raw speed of AI.

0:00 / 28:20
k play/pause · f fullscreen · m mute
n next · p previous clip · t highlights/full
< > slower/faster · / search what was said
  • Red-green TDD2× · first 5:29

    A development practice where tests are written before implementation to constrain and guide coding agents.

  • Showboat1× · first 7:41

    A tool that builds a markdown document tracking the manual test results and curl commands executed by an agent.

  • Prompt injection5× · first 12:53

    A security vulnerability where LLMs are tricked into following malicious instructions embedded within untrusted data.

  • Lethal trifecta3× · first 12:56

    A security risk combination where a model has private data access, malicious instruction exposure, and an exfiltration vector.

  • Claude Code3× · first 16:39

    A coding agent tool capable of driving a terminal and executing development tasks.

  • Cookiecutter1× · first 11:42

    A Python templating tool used to spin up new projects, libraries, and plugins with pre-configured patterns.

  • Conformance suites1× · first 8:38

    Language-agnostic test specifications used to drive agents toward implementing standard-compliant code.