What a self-improvement loop needs
An agent improves its own work when four things are true:
- It can act: write the code, run the app, fill in the form.
- It can observe the result, not only its own output. “The code compiled” isn’t “the user got the email”.
- It can compare this attempt with the last one, so it knows whether a change helped.
- It can keep what it learnt, so the next attempt, or the next session, starts further on.
Agents already do the first well. The other three depend on tools.
Where the loop breaks for sign-up
- The result is in an inbox. The agent submits the form and sees “Check your email”. Whether anything was sent, where its link points and whether the code works are all out of its reach.
- So it reports success too early. “Sign-up is implemented” usually means the form submits. The agent has no evidence either way, and neither do you.
- A made-up address can’t finish the flow, and your own address works once.
- Nothing carries over. Without a record of the last run, the agent can’t tell a fix from a coincidence.
The loop with Proxy Mail QA
The agent does every step. Proxy Mail QA is what it checks with.
| Step | The agent | The tool it uses |
|---|---|---|
| Act | Builds or changes the flow, opens the sign-up page | Its own editor and browser |
| Gets an address, a persona and a password for the form | form_values or create_address |
|
| Observe | Waits for the code or link after submitting | wait_for_code, wait_for_link |
| Asks why nothing came | check_delivery |
|
| Checks the email’s sending, link, expiry and size | check_email, count_emails |
|
| Compare | Records the session and reads what changed since the last ones | start_run, finish_run |
| Keep | Saves what it learnt about the form, with your agreement | save_custom_field, save_signup_screen |
A first pass often goes like this:
- The agent adds email verification and signs up with a new test address.
- The wait finds nothing. The delivery check says the email provider only sends to verified addresses. The agent sees its work isn’t done, and why.
- It fixes the provider’s setup and runs again. The email arrives in four seconds, but the check says its link points at
localhost. - It fixes the site URL and runs again. The link opens staging, the account is verified, and one email came.
- The run’s report shows all three attempts. The agent tells you what it changed and shows the evidence.
Without the inbox, the agent would have stopped after step 1 and said it was finished.
Three things the agent improves
Its work, in this session. Each check answers with what failed and why, so the agent’s next change is aimed at something. This is the loop above.
The project’s setup, for every later session. When the agent meets a field it can’t fill, such as company size, it can ask you and save the answer as a custom field. When it finds the form runs over several screens, it can save them. The next agent, or the next person with the Chrome extension, gets the form right first time. The agent changes these only when you ask or agree.
Its own instructions, for itself. Ask the agent to end a session by writing what it learnt into the file it reads at the start of each one (CLAUDE.md, AGENTS.md, or a skill): “staging’s email provider needs the domain verified”, “the reset link expires in 10 minutes, so open it straight away”. This is the part closest to the word recursive: the agent uses the evidence from one run to change how it will work in the next.
After each change to sign-up, login or password reset, run the auth regression pack on
staging with Proxy Mail QA. If the report shows a new failure, fix it and run again.
When it passes, add one line to AGENTS.md for anything you learnt that the next session
should know, and show me the report.
Knowing whether it got better
A loop needs a measure. The auth regression pack makes the same checks every time: sign-up, a used link opened twice, a replaced reset link, an invitation. Its report ends with what changed since the last runs: slower emails, extra emails, new or intermittent failures, newly failing checks, a new sender or link site.
That gives the agent a before and an after, and gives you something to read that the agent didn’t write about itself.
When a person reports a bug instead, the same loop starts from their report: see Triage sign-up and login bug reports with an agent.
What stays with you
- Proxy Mail QA changes no model and no code. The improving is the agent’s, and so are the mistakes. Read the report, not only the summary.
- Test builds only. The loop runs on development, staging and preview sites, never on your live site or real users’ accounts.
- Lasting changes need your yes. Custom fields, sites and sign-up screens affect everyone in the project.
- The report holds no email text. It keeps addresses, timings, checks and each link’s site, so it can go on a pull request.
- Email only. Codes sent by SMS aren’t covered.