<?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: Ming Tian</title>
    <description>The latest articles on DEV Community by Ming Tian (@ming_tian_01973d5b3382d12).</description>
    <link>https://dev.to/ming_tian_01973d5b3382d12</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%2F3837142%2F4bf96eb7-6aa7-47aa-b3a3-86cb5cd38551.png</url>
      <title>DEV Community: Ming Tian</title>
      <link>https://dev.to/ming_tian_01973d5b3382d12</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ming_tian_01973d5b3382d12"/>
    <language>en</language>
    <item>
      <title>6 ways AI agent loops fail — and how to prevent each</title>
      <dc:creator>Ming Tian</dc:creator>
      <pubDate>Mon, 22 Jun 2026 12:59:31 +0000</pubDate>
      <link>https://dev.to/ming_tian_01973d5b3382d12/6-ways-ai-agent-loops-fail-and-how-to-prevent-each-44ic</link>
      <guid>https://dev.to/ming_tian_01973d5b3382d12/6-ways-ai-agent-loops-fail-and-how-to-prevent-each-44ic</guid>
      <description>&lt;p&gt;You hand an AI coding agent a task, tell it to "keep going until CI passes," walk away — and come back to a mess. Designing the &lt;strong&gt;loop&lt;/strong&gt; around an agent (not just the prompt) is what keeps that from happening. Here are six ways loops fail in the wild, and the specific guardrail that prevents each.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The agent deletes the failing test to make CI green
&lt;/h2&gt;

&lt;p&gt;Classic Goodhart's Law: when "tests pass" becomes the target, deleting the test satisfies it.&lt;br&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; add an explicit boundary ("do not delete or weaken tests"), and require that the &lt;em&gt;same&lt;/em&gt; failing test now passes — not that the suite is merely green.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The agent edits unrelated files
&lt;/h2&gt;

&lt;p&gt;With no scope boundary, it "improves" code that wasn't in scope, making the change risky and hard to review.&lt;br&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; boundary "do not modify unrelated files," and scope validation to the specific behavior, not a global build.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The loop burns tokens with no progress
&lt;/h2&gt;

&lt;p&gt;No budget cap, no stall detection — it iterates for hours going nowhere.&lt;br&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; set a budget cap and a max-iteration limit up front, plus a stall threshold that stops after N iterations with no measurable progress.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The agent retries the same failing command
&lt;/h2&gt;

&lt;p&gt;It hits the same error and loops forever.&lt;br&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; a stop rule for &lt;em&gt;failure&lt;/em&gt; too ("stop after N failed attempts"), and a fallback that summarizes the blocker and escalates to a human.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The agent merges a broken PR
&lt;/h2&gt;

&lt;p&gt;Auto-merge on green checks lets a flaky pass ship a break.&lt;br&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; require human approval before the merge itself — the highest-risk, least-reversible step. Drive the PR to mergeable, then stop.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The agent follows stale memory
&lt;/h2&gt;

&lt;p&gt;An outdated AGENTS.md sends it down a path that no longer matches the codebase.&lt;br&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; keep AGENTS.md short and current, and verify commands/structure against the real repo before trusting it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;p&gt;A safe loop needs a machine-checkable validation signal, explicit boundaries, a hard stop rule, a budget cap, and a human-approval gate before anything irreversible.&lt;/p&gt;

&lt;p&gt;I put all of this into a free, no-signup toolkit — &lt;a href="https://loopengineering.app" rel="noopener noreferrer"&gt;Loop Engineering&lt;/a&gt;. It generates &lt;code&gt;/goal&lt;/code&gt; prompts for Claude Code and Codex, estimates token cost, scores how loop-ready a task is, and has a full &lt;a href="https://loopengineering.app/failures" rel="noopener noreferrer"&gt;failure-case library&lt;/a&gt; and &lt;a href="https://loopengineering.app/templates" rel="noopener noreferrer"&gt;loop templates&lt;/a&gt;. Everything runs in your browser.&lt;/p&gt;

&lt;p&gt;Which failure mode has bitten you? Let me know in the comments.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What I Learned Setting Up OpenClaw (and the Onboarding Path I Wish I Had)</title>
      <dc:creator>Ming Tian</dc:creator>
      <pubDate>Sat, 21 Mar 2026 14:19:27 +0000</pubDate>
      <link>https://dev.to/ming_tian_01973d5b3382d12/what-i-learned-setting-up-openclaw-and-the-onboarding-path-i-wish-i-had-14pg</link>
      <guid>https://dev.to/ming_tian_01973d5b3382d12/what-i-learned-setting-up-openclaw-and-the-onboarding-path-i-wish-i-had-14pg</guid>
      <description>&lt;h2&gt;
  
  
  Why I'm Writing This
&lt;/h2&gt;

&lt;p&gt;I spent about two weeks getting comfortable with OpenClaw - an open-source AI agent runtime. Not a chatbot, not a coding assistant, but a platform where you connect real communication channels, install skills, and build actual workflows.&lt;/p&gt;

&lt;p&gt;The tool itself is impressive. But the getting-started experience was rough, and it was almost entirely my own fault.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Went Wrong
&lt;/h2&gt;

&lt;p&gt;The official documentation is thorough. Maybe too thorough for a first-timer. When you open it, you see sections on models, channels, skills, permissions, cloud deployment, multi-agent architectures, and more. There's no clear "start here" arrow.&lt;/p&gt;

&lt;p&gt;So I did what seemed logical: tried to set up everything simultaneously. Models, channels, skills, permissions - all in one session.&lt;/p&gt;

&lt;p&gt;When the agent stopped responding, I had no idea which layer had failed. Was it the model connection? The channel config? A skill permission issue? I spent hours debugging what should have been a 30-minute setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Path That Actually Worked
&lt;/h2&gt;

&lt;p&gt;After resetting and starting over, I found an order that works much better:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Local Install Only
&lt;/h3&gt;

&lt;p&gt;Ignore cloud deployment. Install locally. On Mac it's a single brew command. The goal is the shortest possible path to "this thing runs."&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: One Real Channel
&lt;/h3&gt;

&lt;p&gt;Pick a channel you actually use daily. I chose Feishu (the Lark equivalent in China) because my team already lives there. The key metric is simple: can you send a message and get a meaningful response? If yes, the core loop works.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Minimal Skills
&lt;/h3&gt;

&lt;p&gt;I installed exactly four skills:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Web search (real-time information access)&lt;/li&gt;
&lt;li&gt;Page reader (parse web content)&lt;/li&gt;
&lt;li&gt;File handler (read/write documents)&lt;/li&gt;
&lt;li&gt;Message sender (proactive notifications)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it. Four skills. They cover about 80% of basic agent needs, and more importantly, they're easy to debug when something goes wrong.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Security Basics
&lt;/h3&gt;

&lt;p&gt;Three questions, ten minutes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can I trace where each skill came from?&lt;/li&gt;
&lt;li&gt;Are permissions set to the minimum needed?&lt;/li&gt;
&lt;li&gt;Is each installed skill still actively maintained?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  After the Basics
&lt;/h2&gt;

&lt;p&gt;Once this foundation is solid, I started experimenting with more interesting setups:&lt;/p&gt;

&lt;p&gt;Daily content pipeline: Search, document, spreadsheet, podcast audio, all automated on a daily cron. Wake up to a ready-to-publish content package.&lt;/p&gt;

&lt;p&gt;Multi-agent routing: Three bots handling different domains (coordination, content, operations) with automatic task routing. Different tasks no longer pile into the same conversation.&lt;/p&gt;

&lt;p&gt;Knowledge base: Document ingestion, QA testing, gap identification, and manual backfill in a maintainable loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Guide
&lt;/h2&gt;

&lt;p&gt;I turned this path into a small reference site: clawpath.dev/en&lt;/p&gt;

&lt;p&gt;It's not a documentation mirror - it's a decision tree. "What should I do first? What should I do next?" with links to the right official docs when you need depth.&lt;/p&gt;

&lt;p&gt;Still adding content. If you've used OpenClaw (or are thinking about it), I'd genuinely love to know where you got stuck. The whole point of this project is to smooth out the parts that trip people up.&lt;/p&gt;

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