<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Agent Loop - Tag - Daily Deep Think</title>
        <link>https://blog.baifan.site/en/tags/agent-loop/</link>
        <description>Agent Loop - Tag - Daily Deep Think</description>
        <generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>blog@baifan.site (ByF)</managingEditor>
            <webMaster>blog@baifan.site (ByF)</webMaster><lastBuildDate>Thu, 07 May 2026 09:00:00 &#43;0800</lastBuildDate><atom:link href="https://blog.baifan.site/en/tags/agent-loop/" rel="self" type="application/rss+xml" /><item>
    <title>The Soul of an AI Coding Assistant: The Think-Act-Observe Loop</title>
    <link>https://blog.baifan.site/en/claude-code-think-act-observe-loop/</link>
    <pubDate>Thu, 07 May 2026 09:00:00 &#43;0800</pubDate><author>
                    <name>ByF</name>
                </author><guid>https://blog.baifan.site/en/claude-code-think-act-observe-loop/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/pictures/note/claude-code-deconstruction-series.svg" referrerpolicy="no-referrer">
            </div><!-- more -->
<p>If you dig through the Claude Code source, you will discover a counterintuitive fact:</p>
<p><strong>The core of the entire program is a while loop.</strong></p>
<p>Not a complex state machine, not an elaborate pipeline, not distributed coordination — just a plain <code>while</code> loop that does three things over and over: let the model think, let the model act, feed the results back.</p>
<div class="code-block highlight is-open show-line-numbers  tw-group tw-my-2">
  <div class="
    
    tw-flex 
    tw-flex-row
    tw-flex-1 
    tw-justify-between 
    tw-w-full tw-bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw-mx-2 
        tw-flex
        tw-flex-row
        tw-flex-1"
      aria-hidden="true">
          <div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></div>
          <p class="tw-select-none !tw-my-1">text</p>]]></description>
</item>
</channel>
</rss>
