Jiufeng
When the Loop Becomes the Bottleneck: Keeping AI Coding Outcome-Driven

When the Loop Becomes the Bottleneck: Keeping AI Coding Outcome-Driven

A Loop can swing the other way: the AI follows every rule and still doesn't ship what the user actually wants. This post covers a subtler failure — no broken code, no process violation, yet the team keeps building prerequisites, revising constraints, and re-reviewing while the main line stays invisible — and how a nearest visible outcome, dual loops, and a review budget pull it back to delivery.

Vibe Coding

Part five. The first four covered why you need a Loop, building one with Claude Code + Codex, stopping drift with Task Packets, and turning prompt rules into machine gates. This one asks the opposite question: as rules, reviews, and evidence pile up, can the Loop itself become the bottleneck?

In brief

The point of Loop Engineering is to make the right things keep happening.

But as rules, reviews, and evidence accumulate, a Loop can swing to the other extreme: the AI follows the process to the letter, yet keeps failing to deliver the outcome the user actually cares about.

This post is about a subtler kind of AI-coding failure: the code has no obvious errors, the process has no violations — but the team keeps building prerequisites, revising constraints, and re-reviewing, while the main-line result stays out of sight.


Drift that looks highly professional

Picture a model-training project.

The end goal is to run one training job on a GPU, watch the loss go down, produce a checkpoint, and get a set of eval results.

But once the AI takes over, it diligently does all of this:

  • defines the training image;
  • designs the storage manifest;
  • writes the data-access policy;
  • adds security guards;
  • writes tests for the guards;
  • expands edge cases per review feedback;
  • calls another AI to re-review the implementation, round after round.

Every task has a reason, and every one relates to the end goal.

The problem: several work cycles have passed, and no training has actually run on the GPU yet.

This is a textbook Loop drift:

Every step is correct, but the correct steps never converge, in time, into a valuable result.


Why a Loop can start blocking delivery

1. The control goal replaces the business goal

The original goal was "run one training job."

After a while, the AI's local goals quietly become:

  • Is the Task Packet complete?
  • Does the Guard cover every file?
  • Did the review miss anything?
  • Does every edge case have a test?
  • Is the ledger updated?

These things are supposed to protect delivery — and without anyone noticing, they become the delivery.

To tell whether a Loop has drifted, ask one simple question:

If you deleted the process documents added this round, what new business result would the user be able to see?

If the answer is "almost none," it's time to re-check the main line.

2. Laying prerequisites sideways instead of driving a path through

An AI easily pushes a complex project by "building the entire foundation first":

image → storage → permissions → data → labeling → training → eval

Architecturally there's nothing wrong with this route, but the feedback cycle is too long. If any prerequisite swells, the final result recedes indefinitely.

A more effective approach is to first complete one minimal vertical slice:

a little synthetic data → a minimal training script → GPU Job
→ loss → checkpoint → eval

It doesn't mean the project is done, but it proves the key assumptions early: the training environment, the model, the data format, backprop, and the artifact chain really do work together.

3. Using one governance intensity for every task

Data permissions, money state machines, and production releases deserve strict review.

But if comment tweaks, reversible config, experiment scripts, and internal tools get the same review intensity, governance cost quickly exceeds implementation cost.

A Loop shouldn't have only "on" and "off" — it should pick an intensity by risk.

IntensityFitsRecommended process
LightDocs, experiment scripts, reversible configImplement, self-check, record the result
StandardModule features, ordinary business logicTask Packet, targeted tests, one focused review
StrictProduction state machines, money, security, data permissionsMachine gates, independent review, rollback evidence, user decision

When judging intensity, focus on three dimensions — blast radius, irreversibility, and cost of being wrong — not the number of files or the name of the task.


Re-anchor the main line with a "nearest visible outcome"

Before a complex task starts, don't define only the end goal — also define the nearest outcome a user can perceive.

For the training project, that nearest outcome might be:

On a GPU, complete one reproducible XLM-R linear-probe training run on synthetic data, producing a loss curve, a checkpoint, a resume-training result, and eval output.

This outcome must declare its boundaries at the same time:

  • it proves the training pipeline runs;
  • it does not prove the model works on real data;
  • it does not replace real data governance;
  • it is not grounds for a production model release.

That way you get real progress without fooling yourself with a pretty experiment result.


Two loops, not one that inflates forever

A mature Loop should split into two loops running at different tempos.

flowchart LR
    A["Business goal"] --> B["Minimal vertical outcome"]
    B --> C["Implement and verify"]
    C --> D["Runnable result"]
    D --> E["Next business milestone"]

    C --> F["Find a process issue"]
    F --> G["Log it lightly"]
    G --> H["Aggregate periodically"]
    H --> I["Update the general rules"]
    I -.affects later tasks.-> B

The first is the delivery loop — it produces code, runnable results, and business value.

The second is the governance loop — it collects drift, mis-reviews, rework, and rule gaps.

Unless a high-risk security issue turns up, the governance loop should not keep interrupting the delivery loop mid-task. Log ordinary process issues and review them together on a fixed cadence, rather than rewriting the whole Loop every time you spot one problem.


Give review a budget

Independent review is valuable, but more review rounds aren't better. You can bound it:

  1. An implementation batch gets one focused review by default.
  2. Review only looks at what changes behavior, widens risk, or breaks an invariant.
  3. After APPROVE, stop fixing non-blocking nitpicks.
  4. When the same class of issue appears two rounds in a row, examine the design or the test strategy — don't keep patching item by item.
  5. When two rounds in a row change only rules, prompts, and the ledger — with no code, decision, or runnable evidence — pause and re-check the main line.
  6. When review cost clearly exceeds implementation cost, re-evaluate the task's intensity.

The goal of review is not a report with zero comments; it's to bring unacceptable risk down to a deliverable range.


The heartbeat should be human-readable

A progress update is not the AI's internal execution log, and it shouldn't be just local IDs like A1, B3, G6a.

An effective heartbeat only needs to answer four things:

Current goal What user-perceivable result is being completed.

Done What code, runnable results, or decisions were produced.

Next What to do next, in priority order, and why.

Needs the user Any risk, permission, or direction question that a human must decide.

IDs are fine for document indexing, but they can't replace natural language. A user shouldn't have to go read three Task Packets to understand progress.


Measuring whether a Loop is healthy

Loop quality can't be judged only by how many problems it intercepts. Watch these too:

  • time to the first visible outcome;
  • the ratio of business-implementation time to governance time;
  • average review rounds per task;
  • number of prerequisite tasks in a row;
  • how often the user has to step in to correct the main line;
  • the share of reviews that found a real defect;
  • the share of approved tasks that get reopened after integration.

If the interception rate goes up but time-to-first-outcome keeps rising, the Loop may be turning from a quality system into a process system.


Safety and progress don't conflict

Cutting ceremony is not cutting quality.

What you actually need to cut:

  • docs with no corresponding risk;
  • repeat reviews with no new information;
  • elaborate guards designed for future hypotheticals;
  • prerequisite work that produces no runnable evidence;
  • mistaking edge-case completeness for MVP completeness.

What you should keep:

  • architectural invariants;
  • machine gates on high-risk operations;
  • reproducible test results;
  • an explicit rollback capability;
  • independent review;
  • honest records of uncovered edges.

A good Loop doesn't make the AI more cautious at every step; it concentrates the caution where a mistake can actually cause loss.


Closing

The most dangerous state for AI coding isn't necessarily writing wrong code fast.

There's another failure that's harder to notice: the AI becomes extremely conscientious — endlessly adding rules, revising docs, widening tests, re-reviewing — yet never pushes the system into its next real state.

The final test for Loop Engineering isn't how completely the process ran; it's this:

With risk under control, do valuable, verifiable results keep showing up?

The right things keep happening — and "things," in the end, has to include delivery itself.