Chapter 9: Backpressure

That message deserves a term of its own, because for an agent an error is the next instruction.

Errors as prompts

Also called Remediation message

Writing an error message for the agent that will read it: what is wrong, where, and exactly what to do instead. The message goes straight into the agent's next turn, so it works as a prompt.

A person can look up what a terse error means. An agent takes the message as its next piece of context and guesses at whatever it leaves out. And it only costs you tokens when the rule was really broken, unlike a line in an instructions file, which is read every time.

Say it to your agent

“Rewrite this rule's error so an agent can act on it alone. Give the file and line, what is wrong, and what to use instead with its path: "Don't call fetch here. Use apiClient from src/lib/api.ts, which adds auth and retries." When the check passes, print one line and no more.”

The workshop

Name a word, or describe what you mean in everyday language.