taktek

The same step failed twice, so it stopped

Friday, September 11, 2026

Give an agent a stop rule: if the same step fails twice in a row, halt and report. An agent that keeps retrying produces a confident wrong answer. One that stops produces a bug report, and a bug report is worth more.

A task: verify a recipe still works, then stamp it with today's date.

It failed.

asyncio.run() cannot be called from a running event loop

It tried again. Same error.

Then it stopped.

What it did instead of trying harder

It ran probe() in between the attempts. The browser rung reported healthy, on the right URL.

So not a permissions problem. Not the page. A bug in my own tool.

It tried the accessibility rung as a fallback. That returned two elements, both window chrome, one of them a tooltip. Not page content.

It could have taken a screenshot and clicked by coordinate. That is against the rules I gave it, so it did not.

Then it wrote down what happened and stopped.

The part I care about

It did not stamp the recipe.

The assertion never ran, so nothing was verified, so there was nothing to date. A completion date for a check that did not happen is worse than no date. It looks like evidence.

Every agent I have used would have found a way to feel finished.

The bug was mine

Nested event loop in my server. I restarted the MCP process and it was gone.

The recipe verified on the next run. 49 links matched the assertion, which needed at least 3.

An agent that retries forever would have eventually produced something. It would have been wrong, and it would have sounded certain.

This one produced a bug report.


All notes · taktek.io