Better with Kent · draft

I Was Doing Loop Engineering Before It Had a Name

Closing the agentic loop has been my pursuit since early 2026.

manual testing
automations
PR loops

Better with Kent

Durable skills for people who ship software

This is Better With Kent, where we get better at the parts of software that keep mattering.

Today: closing the agentic loop.

First clarification

Not a command

I don't use /loop or /goal for this workflow.

The loop lives in the task, tools, feedback, automations, and stop condition.

What the loop is

Agentic loop: trigger enters act-observe loop, stop condition exits TRIGGER STOP CONDITION ACT OBSERVE

Loop engineering widens the human loop.

Give the agent a task, feedback, a way to verify its own work, and a stop condition. The human still decides where the boundary belongs.

Before browser testing

Tests were already a loop

implement write tests run tests iterate

That was useful, but bounded by what the tests could observe. Manual testing widened the feedback loop to real app behavior.

Then the agent got eyes

Browser mode widened it

run app inspect UI fix behavior check again

Before full Cloud Agent environments, Cursor browser mode let agents observe UI behavior directly instead of only reading code and tests. Open the browser-mode slide.

This came before the PR loop

Manual testing was the full-environment unlock

Cursor gave Cloud Agents a real machine, real browser, and persistent environment.

Example: Cursor Agent + kody#550
This was the center of my How I Build Web Applications in 2026 talk (slides): Cursor controls the browser, agents test behavior, and the loop gets closer to reality.

Before I put it in the prompt

I did the PR loop manually

comment @cursor check feedback fix CI push again

Example: kentcdodds.com#581 — if I keep typing the same follow-up, that follow-up belongs inside the loop.

First self-running attempt

I told the agent to keep looping

check PR fix feedback check CI continue

First informal self-loop: Cursor Agent + kody#280

The real unlock

The PR review loop

1Use Kody to mark the PR ready for review.
2Read Cursor Bugbot and CodeRabbit comments.
3Address every valid issue.
4Watch CI and fix failures.
5Repeat until the PR is clean.
6Ping me on Discord with the PR link.

First formal: Cursor Agent + kody#155

PR feedback becomes input

ready for review Bugbot CodeRabbit CI follow-up

Example tab: kody#155 — by the time the PR comes to me, AI reviewers and CI have already pushed back.

Stop condition

When CI is green and no valid feedback remains, ping me with the PR link.

That Discord message is the handoff. I do not have to keep an eye on the loop while it runs.

Automations came after

1Production/deploy pipeline fails → launch a Cloud Agent.
2Nightly docs review → remove temporal/changelog language.
3Nightly test cleanup → remove low-signal tests agents tend to add.

This is where closed loops become proactive loop engineering: triggers, schedules, and state.

Cost is real

This is not under-$200-plan behavior.

  • I get token credits in exchange for feedback, so I do not have a clean dollar number.
  • Cloud machines, browser checks, CI, review bots, and retries all add up.
  • I expect costs to come down as more data center capacity comes online.
  • The trade is compute for attention.

Boundaries

Failure is an option

Sometimes I let the agent merge and validate production.

Failure is not an option

Move the human stop point earlier.

Pocket OS callback: give the agent agency inside clear boundaries.

Homework

Create one useful automation

Pick your preferred agent and automate one loop you already repeat by hand.

  • Start with an annoying, low-risk recurring task.
  • Define the trigger, feedback, and stop condition.
  • Keep the human handoff explicit.

Better with Kent

This was Better With Kent

Good agents make code cheaper to generate. Good loops make work cheaper to verify.

Like · comment · subscribe · get better with me