First run the tests
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
A four-word prompt, 'first run the tests', has become a practical discipline for keeping AI-generated code from breaking in production.
Simon Willison argues that automated tests, small programs that check whether software works, are essential when using AI coding agents like Claude Code, because untested AI code often fails when deployed. He starts every agent session with the prompt 'First run the tests,' which makes the agent locate and run the existing test suite. This also teaches the agent about the codebase and pushes it to write its own tests. No benchmarks or product details are given.
Willison's guidance addresses the main risk of AI-assisted development: code that was never executed may not work in production. His remedy costs little, instructing agents like Claude Code to run existing tests at the start of every session. Teams without test suites lose a key safeguard and a way for agents to learn their codebase. The article is opinion and practice, not a product announcement or pricing news.
Willison recommends starting every coding-agent session with 'First run the tests' or, for his Python projects, 'Run "uv run pytest"' via pyproject.toml dependency groups. The prompt forces the agent to discover the test harness, which reveals project size and complexity, biases it toward testing its own changes, and exposes it to tests as codebase documentation. It complements his red/green TDD pattern. No benchmarks, metrics, or limitations are provided.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
Speculative Decoding Makes Tool Calls Faster. Agents Need a Cache.
Speed improvements in speculative decoding mean agents can execute tool calls faster, reducing latency for real-time applications.
OpenGame: turn your local coding agent into a full-stack game studio
Developers with a local coding agent can now scaffold full playable 3D games, art, music, testing, publishing, instead of only refactoring code, opening a path from hobby coding to shippable mini-games.
Let Claude Code or any agent tap, type, and read your real phone
Agents can now close the mobile testing gap by driving and reading a real phone themselves, with nothing installed on the device.
n8n's open source personal agent runs on your machine and asks before it acts
Developers uneasy about cloud-based AI agents get a local, approval-gated alternative they can download today, though its research-preview status limits real reliance.