logo

Protect Your Attention: Start by Learning the Principles of Loop Engineering

Jul 8, 2026 · 975 words

Originally published onWeChat Official Account: FUTURE CODER 未来开发者, View original

This article is the second installment in the AI Programming Attention series.

In the previous article, we discussed how modern AI programming products support multi-task management, yet the constant switching between tasks is fragmenting our attention.

When it comes to the word “attention,” I really like a quote from Sam Schillace (Deputy CTO at Microsoft):

AI attention scales. Human attention doesn’t.

As long as you are willing to spend money, AI output can grow almost infinitely. However, your attention is finite; you can only focus on one thing at a single moment.

Therefore, I plan to continue writing this “Attention” series. Attention should be considered the most critical resource in AI programming. You need to protect your attention and increase the output per unit of your attention.

Loop Engineering, Prompts, and Attention

The concept of Loop Engineering, which gained significant traction recently, might sound a bit pretentious, but one of its core ideas is excellent: you shouldn’t manually write a prompt for every task. Instead, you should try to have tasks trigger themselves or let the AI write the prompts. For example:

  • Setting up scheduled tasks so AI performs repetitive work daily.
  • Building workflows triggered by specific conditions, such as automatically drafting a reply after receiving an email.
  • Using capabilities like Claude Code’s Workflow to let the AI launch more agents and write prompts for each one.

The starting point of Loop Engineering is to use greater leverage to drive AI output—trusting the capabilities of agents and letting AI execute tasks automatically to amplify overall production efficiency.

However, from a counter-perspective, I see Loop Engineering as a way to make humans write fewer prompts, thereby protecting human attention.

In the process of using AI for programming, I have gradually realized that the number of prompts I can write in a day is limited. The number of prompts represents my attention resources.

In the Cursor 1.0 era, when only one task was open at a time, I might only write a few dozen prompts a day. But now, when I frequently engage in multi-tasking, it is entirely possible to write over a hundred prompts a day. When the number of prompts I write reaches a certain threshold, I feel unable to continue, experiencing a sense of exhaustion. This happens even with very simple prompts.

From Manual Prompts to Automatic Prompts

A typical example of “Prompt Exhaustion” I encountered was AI code review.

I believe most people are already using AI to review code. At the time, I was using Codex Reviewer to review my PRs on GitHub. Codex Reviewer had a rather annoying quirk: it would only provide one or two review comments at a time. Once I fixed those two comments, it would provide another two in the second round. I was working on a complex project back then, and this cycle of review and modification went on for over a dozen rounds.

In this process, every round of fixes consumed at least 3 prompts (one to check what the review comment was, one to decide whether to fix it, and one to update the PR after the fix). With over a dozen rounds, dozens of prompts were poured into it.

Since prompts represent attention resources, this meant I spent a massive amount of attention on a single PR. Under these circumstances, it became difficult for me to perform other tasks well.

To solve the problem of PR reviews consuming too much attention, our team built a framework for automatically fixing review issues. The concept of Loop Engineering didn’t exist yet, but what we were doing was essentially “Automatic Prompting.”

The framework we built automatically listens for PR review comments. When a comment appears, it starts a local Agent CLI, automatically prompts it to fix the issue, updates the PR after the fix, and closes the issues. If a new round of review comments appears, it starts working again until the entire review is complete.

The entire process is fully automated and requires no intervention from me. This made my PR review work exceptionally easy; I just needed to open the PR and wait for a while for all review comments to be fixed automatically.

During this time, I didn’t need to write a single line of prompt, nor did I need to pay attention to what the specific review comments were. This meant I could completely put it out of my mind and invest myself in other tasks.

Reducing Attention Consumption

In this example, even simple prompts like “fix issue” or “update PR” are a drain on attention. This is because I need to switch my focus; every time I switch attention, it constitutes a consumption of resources.

This is what I consider the most valuable aspect of the Loop Engineering philosophy: trying to make tasks trigger and complete automatically, reducing the number of manual prompts to zero.

Since attention is the most important resource in AI programming, we need to use it where it matters most. Delegate simple tasks and repetitive prompts to automatic execution, and use the saved energy for truly critical decisions and key prompts.

If you are also troubled by the constant depletion of your attention resources, you might want to look into and learn from the ideas of Loop Engineering to optimize your workflow.

If you want to know how our team’s automatic PR fix was implemented, you can check out this open-source project, Looper:

https://github.com/nexu-io/looper

It implements a Reviewer and a Fixer—one responsible for reviewing the PR and the other for fixing the review comments in the PR. These two can be used as a pair, and both can be executed automatically with zero prompts.

You can also extend this same logic to more task workflows. I hope you can accomplish more tasks with fewer prompts.