Skip to content

Fix an agent's repeated mistakes in code before writing another rule: reading "All Code Is Slop (Except Mine)"

A reading of Lauren Tan's AI Engineer CODE 2026 talk "All Code Is Slop (Except Mine)": why corrections to AI agents belong in design, lint rules and verification more than in written rules, how to read the numbers her team reported, and where to start in your own codebase.

When an AI agent keeps making the same mistake, the easy fix is one more warning in a rules file such as AGENTS.md. At AI Engineer CODE in November 2026, Lauren Tan argued for moving that correction somewhere a machine checks every time: the design of the code, a lint rule, or an automated test. A written warning carries no guarantee that anyone follows it, and a workaround left in the repository becomes the example the next agent copies. The numbers her team reported are their own, but the order of work she describes holds up at any scale: before handing agents more of the work, improve the code they read and the ways their output gets verified.

The talk asks how to ship more without losing quality

Tan gave the talk on the main stage of AI Engineer CODE 2026 on November 11, 2026. "Slop" is the word for the low-quality output generative AI turns out in bulk. She opened by asking the audience whether they had ever looked at someone else's code and thought it was all slop.

She then said that in the previous month she had shipped 3,000 pull requests to production on her own. Her slide of monthly bars runs from 68 in March to 3,127 in October. Getting there took six months of building the environment her agents work in. In her view, a software engineer's job is now to keep code quality steady or improve it while greatly increasing output. The talk's theme is trust: investing in the agents' environment until there is good reason to expect them to do the right thing, as opposed to trusting them blindly.

She drew the change she is after as two loops. In a low-trust environment, the agent writes slop, a person checks it, and the problems found go back to the agent. The slide notes that most people get stuck here. The goal is an environment where the agent writes good code and also does the checking itself.

Low trust

  1. The agent writes

    The code is slop

  2. A person checks

  3. Issues are found

Where most people get stuck

High trust

  1. The agent writes

    The code is good

  2. The agent checks

  3. Issues are found

Where you want to be: the agent runs the loop

Writing and checking code in a low-trust and a high-trust environment (based on Lauren Tan's slides)

Her examples come from a desktop app her team builds with Electron and from the framework they wrote for it. The talk is about how code gets written, and also about which checks people keep and which they hand to machines.

Spend time on code first, then static checks, verification and prose

Tan drew where to spend time on an agent's environment as an inverted pyramid. The two widest layers at the top are deterministic, meaning they give the same result every time. The first is the code itself: API design, architecture and refactoring. The second is lint rules, type systems, compilers and the various kinds of tests. Together they constrain agents so that the default path is the correct one.

Below those sit runtime verification and formal verification. This layer finds bugs, checks properties the system must always keep, and shows whether the agent understood the goal and intent. Then comes a thin layer of prose: rules, skills and files like AGENTS.md. Prose is kept for things that need judgment. On the slide, human review sits below prose as the narrowest layer, and a downward arrow on the left is labeled "cost": the lower the layer, the more it costs, so most of the effort goes into the wide layers at the top.

Lower layers cost more

  1. Code

    Deterministic

    API design, architecture, refactoring

  2. Static checks

    Deterministic

    Lint rules, types, compilers, tests, CI

  3. Verification

    Formal, runtime

  4. Prose

    Rules, skills, AGENTS.md

  5. Human review

The layers of an agent's environment (based on Lauren Tan's slides)

Her reason for this order is that the codebase is one of the largest inputs an agent has. Agents build their output from their input, so the quality of the input shows up in the output. Each time you correct an agent, she suggested asking whether the correction can become a deterministic check before adding a line to the rules file. A check in code behaves the same way every time, so you can rely on it.

A workaround left in the code becomes the next agent's template

Tan compared a codebase to a garden. In 2024 she would come into work and review about three pull requests from colleagues; now the number is closer to 300. Each engineer runs hundreds or thousands of agents, and code arrives in a near continuous stream. The codebase and its constraints are the foundation that new code grows around.

The trouble is that the weeds get copied too. Workarounds, anti-patterns and deprecated code that stay in the repository look like the established way of doing things, so the next agent repeats them. Keeping the codebase as clean as possible means agents copy the good parts. Cleaning up old patterns pays down past debt, and it also raises the quality of the code agents will write next.

Rows of tidy planters in which a single blue weed reappears in plot after plot, growing thicker in the plots farthest along
A workaround copied like a weed (illustration generated for this article)

Remove whole classes of mistakes so they cannot be written

The first example is Dune, a framework her team built. Tan described it as something like Next.js for Electron apps. It is not technically novel; what sets it apart is that it encodes many lessons from building desktop apps as constraints and lint rules.

One lesson is that anything needing a lot of nuance to use well tends to produce slop. Her example is React's useEffect, which has real uses but is often misused, and agents are bad at it. Her team banned it in product code and allows it only in a few places inside Dune's own APIs. She said this removed the problem entirely, so reviewers no longer have to catch it.

The second example uses directory structure to carry the design. In an Electron app, importing main-process code into the renderer, the process that draws the UI, runs long tasks on the UI side and makes the app stutter. Tan said agents often made this import in Cursor, the Electron-based code editor. Her team's app has two top-level directories named electron-main and electron-renderer, and a dependency graph analyzer plus lint rules forbid imports across them. According to the slide, the ban covers type imports too, and types both sides need live in a directory called shared. The directory names explain the design, and the checks enforce it.

electron-renderer/

Draws the UI

  • features/
  • client/
  • primitives/

No imports across, not even types

electron-main/

Main process

  • startup/
  • notifications/
  • update/

shared/

Types both sides use

Dune's directory layout and its import rule (based on Lauren Tan's slides)

Both are simple rules to set up, and each takes one item off the review checklist. Tan presented them as choices that fit her team's architecture.

Quick fixes get copied along with the comments that justify them

One thing that surprised Tan was agents using prose (documentation, code comments, rules and skills) to write down why they did not do the right thing. Agents also over-apply small corrections, treating them as rules that can never be broken.

Her example again comes from Cursor. Agents leaned on timers such as setTimeout, requestAnimationFrame and requestIdleCallback as quick fixes. Underneath was an architectural clash between VS Code's imperative style and React's declarative style. Creating and discarding many timers triggers frequent garbage collection, which makes the UI lag. The agents also wrote many comments explaining why each quick fix was justified, and before long timers had spread across the code and the app's performance suffered.

The slide traces one such spread. On September 9, an agent fixed a flicker with a setTimeout and a comment saying the release would happen later; doing it properly, the agent said, would be a larger change. By October 3 the pattern had been copied into a shared module, and by October 17 there were 183 timers.

  1. Sep 9

    A setTimeout fixes a flicker, with a comment justifying it

  2. Oct 3

    The pattern is copied into a shared module

  3. Oct 17

    183 timers

How a commented quick fix spread (based on Lauren Tan's slides)

Ban comments and let lint rules point to the root fix

Her current team bans 99% of comments. They go stale, people rarely read them, and they give an agent an excuse to skip a hard fix. A comment meant to warn the next agent cannot enforce anything either. In their place the team writes lint rules whose error messages tell the agent to fix the root cause. The team's policy is that every correction to an agent becomes a deterministic check, or the API or architecture changes so the mistake can no longer be written.

According to Tan, doing this repeatedly shrinks what reviewers need to watch for. Eventually there is almost nothing left to review, and agents can merge most of their own pull requests.

The number of code comments, on the slide's bar chart, fell from 65,824 on July 31 to 1,227 at the time of the talk.

  1. 65,824
  2. 1,227
Number of code comments on July 31 and at the time of the talk (based on Lauren Tan's slides)

Review evidence that the code works, more than the diff

The second half of the talk covers verification. On Tan's team, code review now mostly means looking at verification artifacts: videos, screenshots, diagrams and formal verification results.

The most basic form is runtime verification. Agents can run the app themselves and use the same debugging tools human developers use, such as the Chrome DevTools Protocol. The team's verification skills include what they call a feature map, a list of the app's features from the user's point of view. The slide draws it as a chain from what features exist, to how users reach each one, to what proves it works. With it, an agent does not have to guess what "the thing in the left sidebar" means. The skills also include custom CLIs and drivers for operating the app, which agents reuse every time. That cuts token usage, and the CLIs themselves can be tested.

The team has started on formal verification too. They use TLA+ to model-check major user flows such as notifications across multiple devices and platforms. For a custom virtualization library, which renders only the visible part of a long list, they use Lean to check that it does not flicker or jitter. These checks have already found several bugs, though Tan treats them as one more layer in the environment and no silver bullet. The team has also started property-based testing of the UI with a library called Bombadil, which has caught UI bugs as well.

  • Runtime verification

    What it checks
    The running app, driven by the agent
    Tool
    Chrome DevTools Protocol, custom CLIs
  • Model checking

    What it checks
    Major flows such as notifications across devices
    Tool
    TLA+
  • Proofs

    What it checks
    That the virtualization library does not flicker or jitter
    Tool
    Lean
  • Property-based UI testing

    What it checks
    UI bugs
    Tool
    Bombadil
Verification methods and tools mentioned in the talk (based on Lauren Tan's talk)

Tan quoted a post by Cindy Sridharan saying that 70% of her daily token spend goes into verifying patches and only about 20 to 30% into creating them. Tan said most of her own tokens go to verification as well. None of these techniques is new. They were too costly to understand, write and maintain to be worth it before. In her view, agents have cut that cost sharply, so far more of a product can be verified in depth than used to be economical.

Read the reported numbers as the team's own account

Tan reported that her team shipped 11,000 pull requests to production in the previous month. On her slide, the pull requests the team merged rose from 809 in June to 10,926 in October, 23,370 over the five months. They cut a new stable release about once a day, and in October about 227 people contributed at least one pull request, including drive-by contributors with little background on the code.

23,370 in total

  1. 809
  2. 1,784
  3. 4,203
  4. 5,648
  5. 10,926
Pull requests the team merged each month (based on Lauren Tan's slides)

She said the share of reverted pull requests has fallen in relative terms as volume rose and is steady at about 0.5%. These are figures the team reported, not results of a controlled experiment, and the talk gives no earlier revert rate to compare against.

Most operations got faster, and resource use went up

Tan said startup, typing, opening new chats and switching chats have all become faster than at launch. Her slide compares May with now on 15 measures. A cold launch went from 2,304 ms to 1,395 ms, for example, and the median typing latency in a long chat from 8.4 ms to 2.9 ms.

The same slide shows what got worse. Resizing the window went from 3.0 ms to 6.9 ms, idle memory from 488 MiB to 545 MiB, and the JavaScript and CSS loaded at startup from 2.0 MB to 7.7 MB. A line under the chart says there is a ceiling, but Electron apps can be decently fast.

Startup

  • Cold launch

    −39%

    2,304 → 1,395 ms

  • Relaunch

    −39%

    1,348 → 829 ms

  • First paint, cold

    −39%

    2,268 → 1,379 ms

Typing

  • Short chat, median

    −26%

    3.8 → 2.8 ms

  • Long chat, median

    −65%

    8.4 → 2.9 ms

  • Long chat, p90

    −65%

    9.7 → 3.4 ms

Opening

  • Settings

    −18%

    112 → 92 ms

  • Long chat, cold

    +8%

    153 → 165 ms

  • Long chat, warm

    −38%

    138 → 86 ms

Switching and resizing

  • To a short chat

    −44%

    88 → 49 ms

  • Back to a long chat

    −40%

    105 → 63 ms

  • Resize the window

    +130%

    3.0 → 6.9 ms

Resources

  • Memory, idle

    +12%

    488 → 545 MiB

  • Idle CPU

    +100%

    0.40 → 0.80%

  • JS and CSS at startup

    +285%

    2.0 → 7.7 MB

Performance in May and now, 15 measures (based on Lauren Tan's slides)

The performance numbers are also the team's own measurements. The order in which the team did the work is more useful to take away than the numbers themselves.

Automate the outer loop only after the inner loop is reliable

Tan closed by advising that before building a software factory and automating everything, you correct agents by improving the codebase first. Add a lint rule to stop new instances of an anti-pattern, clean up the old instances, and make verification strong. If the inner loop of writing and checking code produces slop, automating it only produces more slop and burns more tokens.

Near the end, Tan also presented her team's app as a tool for automating the outer loop, the system that calls agents repeatedly. As an example of what becomes possible on that foundation, she described a routine that runs on every release. When a new version is cut, agents fuzz the whole app by using it like a real user, open a fix pull request for each bug they find, and merge those fixes automatically. She said this works because the codebase is in good enough shape that agents' pull requests tend to be good by default.

A small team or a solo developer will struggle to match the verification her team has built, but the order of questions to ask when an agent gets something wrong carries over as is. Before adding a line to the notes, check whether the design can make the mistake impossible to write, and whether a lint rule or a test can catch it. Where a comment explains a workaround, look for copies of that workaround elsewhere in the code. The bans on useEffect and on comments were presented as choices that suit one team. The practical starting point is to pick one mistake you keep correcting in your own codebase and turn it into a check, without copying those rules wholesale.

This is a commentary on Lauren Tan's talk "All Code Is Slop (Except Mine)" at AI Engineer CODE 2026, based on the summary on the talk page, the slides shown in the recording, and the machine-generated transcript of the recording. It is not a translation of the talk and does not speak for the speaker. The transcript contains recognition errors, so only names that could be confirmed are used. The numbers are those reported by the speaker's team, and the figures are redrawn from the slides. The latter parts of the last two sections are this article's own analysis. Sources checked on November 19, 2026.

Read next

All insights