<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Faisal Ishfaq</title>
    <description>The latest articles on DEV Community by Faisal Ishfaq (@faisal_ishfaq_50c9d0242ef).</description>
    <link>https://dev.to/faisal_ishfaq_50c9d0242ef</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4008609%2F28b1a352-2b67-40da-a160-18f046abadf1.jpg</url>
      <title>DEV Community: Faisal Ishfaq</title>
      <link>https://dev.to/faisal_ishfaq_50c9d0242ef</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/faisal_ishfaq_50c9d0242ef"/>
    <language>en</language>
    <item>
      <title>I stopped prompting my coding agent. I designed the loop that prompts it. (alt: "Your AI agent grades its own homework. Here's how I stopped it.")</title>
      <dc:creator>Faisal Ishfaq</dc:creator>
      <pubDate>Mon, 29 Jun 2026 18:05:25 +0000</pubDate>
      <link>https://dev.to/faisal_ishfaq_50c9d0242ef/i-stopped-prompting-my-coding-agent-i-designed-the-loop-that-prompts-it-alt-your-ai-agent-2ca8</link>
      <guid>https://dev.to/faisal_ishfaq_50c9d0242ef/i-stopped-prompting-my-coding-agent-i-designed-the-loop-that-prompts-it-alt-your-ai-agent-2ca8</guid>
      <description>&lt;p&gt;&lt;strong&gt;"I don't prompt Claude anymore. I have loops running that prompt Claude."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's a line from Boris Cherny, creator of Claude Code.&lt;/p&gt;

&lt;p&gt;The first time I read it, it completely reframed how I think about coding agents. It's also the reason I built LoopFlow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/faisalishfaq2005/loopflow" rel="noopener noreferrer"&gt;https://github.com/faisalishfaq2005/loopflow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the last couple of years, my workflow with AI coding tools looked the same: write a prompt, read the output, write another prompt, review the result, then repeat. The human stayed in the middle of every step.&lt;/p&gt;

&lt;p&gt;A loop changes that dynamic.&lt;/p&gt;

&lt;p&gt;Instead of continuously telling an agent what to do next, you define what "done" looks like and let the agent iterate toward that outcome. The workflow becomes: attempt → verify → retry until success or until the loop reaches a limit.&lt;/p&gt;

&lt;p&gt;That sounds great in theory. In practice, the moment I started letting agents run unattended, three problems appeared almost immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem #1: Agents Grade Their Own Homework&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The same model that writes a fix is usually happy to tell you that the fix works.&lt;/p&gt;

&lt;p&gt;That's a problem.&lt;/p&gt;

&lt;p&gt;In LoopFlow, verification is handled by a separate gate agent with a completely different role and persona. The gate acts like a skeptical reviewer rather than a collaborator. For a loop to succeed, the reviewer must explicitly conclude with:&lt;/p&gt;

&lt;p&gt;VERDICT: PASS&lt;/p&gt;

&lt;p&gt;Anything else counts as failure.&lt;/p&gt;

&lt;p&gt;No verdict means no pass. An unverified success isn't a success.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem #2: Unattended Loops Burn Money&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A loop that can work autonomously can also make mistakes autonomously.&lt;/p&gt;

&lt;p&gt;Without limits, an agent can spend a surprising amount of money repeatedly chasing the wrong solution.&lt;/p&gt;

&lt;p&gt;That's why every LoopFlow run has a hard budget. The ceiling is enforced both by the LoopFlow runner itself and by Claude Code's own --max-budget-usd setting on every step.&lt;/p&gt;

&lt;p&gt;The loop can keep trying.&lt;/p&gt;

&lt;p&gt;It can't keep spending forever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem #3: The Agent Forgets Everything&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Agents are stateless.&lt;/p&gt;

&lt;p&gt;What they learn in one run disappears in the next.&lt;/p&gt;

&lt;p&gt;To solve that, every LoopFlow loop maintains a simple Markdown memory file. After each iteration, observations are appended to memory and injected into future prompts.&lt;/p&gt;

&lt;p&gt;The agent forgets.&lt;/p&gt;

&lt;p&gt;The repository doesn't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Does a Loop Look Like?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A typical loop is surprisingly small:&lt;/p&gt;

&lt;p&gt;name: test-and-fix&lt;/p&gt;

&lt;p&gt;budget:&lt;br&gt;
  max_usd: 2.00&lt;br&gt;
  max_iterations: 3&lt;/p&gt;

&lt;p&gt;steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;id: fix&lt;br&gt;
role: You are a careful maintainer who never weakens a test to make it pass.&lt;br&gt;
prompt: Run the test suite. Fix the root cause of any failure. Re-run to confirm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;id: review&lt;br&gt;
gate: true&lt;br&gt;
role: You are a skeptical senior engineer reviewing a change you did not write.&lt;br&gt;
prompt: Inspect the diff, re-run the suite yourself, and verify that no test was weakened.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One agent writes.&lt;/p&gt;

&lt;p&gt;A different agent reviews.&lt;/p&gt;

&lt;p&gt;Memory makes every iteration smarter than the previous one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trying It Out&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;npm install -g @loopflow/cli&lt;/p&gt;

&lt;p&gt;cd your-project&lt;/p&gt;

&lt;p&gt;loopflow init&lt;/p&gt;

&lt;h1&gt;
  
  
  See exactly what each agent will be told
&lt;/h1&gt;

&lt;p&gt;loopflow run test-and-fix --dry-run&lt;/p&gt;

&lt;h1&gt;
  
  
  Execute the loop
&lt;/h1&gt;

&lt;p&gt;loopflow run test-and-fix&lt;/p&gt;

&lt;p&gt;LoopFlow doesn't introduce another cloud service, daemon, or API layer.&lt;/p&gt;

&lt;p&gt;If Claude works in your terminal, LoopFlow works too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Staying the Engineer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The biggest lesson I've learned from building loops is that they don't replace engineers.&lt;/p&gt;

&lt;p&gt;They change what engineers spend their time doing.&lt;/p&gt;

&lt;p&gt;The faster a loop can generate code you didn't write, the more important it becomes to understand what was actually produced. Otherwise, the gap between the software that exists and the software you understand grows very quickly.&lt;/p&gt;

&lt;p&gt;That's why LoopFlow keeps memory files, preserves worktrees, and makes verification explicit. The goal isn't to remove humans from the process. The goal is to move humans into higher-leverage positions within it.&lt;/p&gt;

&lt;p&gt;Build loops.&lt;/p&gt;

&lt;p&gt;But build them like someone who intends to remain the engineer, not just the person who presses "Run."&lt;/p&gt;

&lt;p&gt;LoopFlow is open source (MIT), written in typed and tested TypeScript, and already has 35+ GitHub stars from developers experimenting with loop-based workflows.&lt;/p&gt;

&lt;p&gt;If you build a useful loop, I'd love to see a contribution to the cookbook:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/faisalishfaq2005/loopflow" rel="noopener noreferrer"&gt;https://github.com/faisalishfaq2005/loopflow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnvm9icyoend73j066la1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnvm9icyoend73j066la1.png" alt=" " width="800" height="1177"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
