{"id":7626,"date":"2026-10-25T16:13:25","date_gmt":"2026-10-25T16:13:25","guid":{"rendered":"https:\/\/jonjones.ai\/uncategorized\/claude-code-loop\/"},"modified":"2026-10-25T16:13:25","modified_gmt":"2026-10-25T16:13:25","slug":"claude-code-loop","status":"publish","type":"post","link":"https:\/\/jonjones.ai\/zh\/%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7\/claude-code-loop\/","title":{"rendered":"Claude Code \u5faa\u74b0\u6307\u5357\uff1a\/loop\u3001\/goal \u548c 1800 \u591a\u6b21\u7121\u4eba\u503c\u5b88\u904b\u884c\u80cc\u5f8c\u7684 Cron \u5faa\u74b0 (2026)"},"content":{"rendered":"<p>\u985e\u578b <code>\/loop 5m check the deploy<\/code> and Claude Code will keep checking your deploy every five minutes until you tell it to stop. That&#8217;s the <strong>Claude Code loop<\/strong> most people mean, and it&#8217;s a great tool. It also stops working when you close your laptop, and it deletes itself after seven days.<\/p>\n\n<p>I run ten businesses on unattended Claude Code agents, and this container alone has written more than 1,800 run logs since June 12, 2026. None of those runs used <code>\/\u74b0\u5f62<\/code>. That&#8217;s not because <code>\/\u74b0\u5f62<\/code> is bad. It&#8217;s because it was built for a different job.<\/p>\n\n<p>This Claude Code loop guide covers both jobs. You&#8217;ll get the three kinds of loop in Claude Code, exactly how <code>\/\u74b0\u5f62<\/code> behaves (intervals, self-pacing, <code>loop.md<\/code>, the jitter, the 7-day expiry), how it compares to <code>\/goal<\/code>, Stop hooks and the bash-style &#8220;Ralph&#8221; loop, and the cron loop that runs my fleet. All the numbers come from the official docs as of October 2026 or from my own logs, and I&#8217;ll tell you which is which.<\/p>\n\n<h2>What a Claude Code Loop Actually Is (There Are Three)<\/h2>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"752\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s1-20261026-1.jpg\" alt=\"claude code loop\" class=\"wp-image-7619\" srcset=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s1-20261026-1.jpg 1344w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s1-20261026-1-768x430.jpg 768w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s1-20261026-1-18x10.jpg 18w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s1-20261026-1-600x336.jpg 600w\" sizes=\"auto, (max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n<p>Most articles in this search treat &#8220;loop&#8221; as one idea. There are really three loops in Claude Code, stacked inside each other. Most confusion comes from mixing them up.<\/p>\n\n<h3>Loop 1: the agent loop (inside one turn)<\/h3>\n<p>Every Claude Code turn is already a loop. Claude reads your prompt, calls a tool, reads the result, and decides what to do next. It keeps going until it thinks the task is done. You get this for free. You never type anything to turn it on.<\/p>\n\n<h3>Loop 2: the session loop (between turns)<\/h3>\n<p>This is where <code>\/\u74b0\u5f62<\/code> \u548c <code>\/goal<\/code> live. They keep <em>one open session<\/em> going after a turn would normally hand control back to you. <code>\/\u74b0\u5f62<\/code> starts the next turn when a time interval passes. <code>\/goal<\/code> starts it when a separate evaluator decides your condition isn&#8217;t met yet.<\/p>\n\n<h3>Loop 3: the outer loop (between sessions)<\/h3>\n<p>This one starts a <em>brand-new<\/em> Claude Code session on a schedule, does one job, and exits. Cron plus <code>\u514b\u52de\u5fb7-p<\/code>, Anthropic&#8217;s cloud scheduled tasks, Desktop scheduled tasks and GitHub Actions all live here. My fleet lives here too. It&#8217;s the top rung of the autonomy ladder I laid out in <a href=\"https:\/\/jonjones.ai\/zh\/%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7\/ai-coding-agent\/\">what an AI coding agent actually is<\/a>.<\/p>\n\n<figure class=\"wp-block-table\"><table>\n<thead><tr><th>Loop<\/th><th>What starts the next pass<\/th><th>Survives closing the terminal?<\/th><th>\u6700\u9069\u5408<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Agent loop<\/td><td>The last tool result<\/td><td>n\/a (one turn)<\/td><td>Every task, automatically<\/td><\/tr>\n<tr><td><code>\/\u74b0\u5f62<\/code><\/td><td>A time interval, fixed or chosen by Claude<\/td><td>\u4e0d<\/td><td>Polling while you work<\/td><\/tr>\n<tr><td><code>\/goal<\/code><\/td><td>The previous turn finishing, if the condition isn&#8217;t met<\/td><td>No (restored on resume)<\/td><td>Grinding toward a checkable end state<\/td><\/tr>\n<tr><td>Outer loop (cron, cloud, Desktop, CI)<\/td><td>A clock or an event<\/td><td>\u662f\u7684<\/td><td>Unattended recurring work<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n<p>Pick your Claude Code loop by asking one question: <strong>does a human have this session open?<\/strong> If yes, use a session loop. If the work has to happen at 3am while you sleep, you need the outer loop. Running a session loop for that is like leaving a terminal open and hoping.<\/p>\n\n<h2>How \/loop Works: Fixed Intervals, Self-Pacing, and loop.md<\/h2>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"752\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s2-20261026.jpg\" alt=\"A brass metronome mid-swing, standing in for a fixed loop interval\" class=\"wp-image-7620\" srcset=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s2-20261026.jpg 1344w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s2-20261026-768x430.jpg 768w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s2-20261026-18x10.jpg 18w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s2-20261026-600x336.jpg 600w\" sizes=\"auto, (max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n<p><code>\/\u74b0\u5f62<\/code> is a <a href=\"https:\/\/code.claude.com\/docs\/en\/scheduled-tasks\" target=\"_blank\" rel=\"noopener\">bundled skill<\/a>. Both arguments are optional, and what you give it decides how it behaves.<\/p>\n\n<figure class=\"wp-block-table\"><table>\n<thead><tr><th>You type<\/th><th>What happens<\/th><\/tr><\/thead>\n<tbody>\n<tr><td><code>\/loop 5m check the deploy<\/code><\/td><td>Your prompt runs on a fixed schedule (converted to cron)<\/td><\/tr>\n<tr><td><code>\/loop check the deploy<\/code><\/td><td>Self-paced: Claude picks a delay between 1 minute and 1 hour after each pass<\/td><\/tr>\n<tr><td><code>\/\u74b0\u5f62<\/code> \u6216\u8005 <code>\/loop 15m<\/code><\/td><td>Runs your <code>loop.md<\/code> if you have one, otherwise the built-in maintenance prompt<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n<h3>Fixed interval<\/h3>\n<p>Give it an interval and Claude turns it into a cron expression, schedules it, and confirms the job ID. Units are <code>s<\/code>, <code>m<\/code>, <code>h<\/code> \u548c <code>d<\/code>. The interval can come first (<code>30m<\/code>) or last (&#8220;every 2 hours&#8221;). Seconds round up to a full minute, because cron can&#8217;t schedule anything finer than one minute. Intervals that don&#8217;t divide cleanly, like <code>7m<\/code> \u6216\u8005 <code>90m<\/code>, get rounded to the nearest one that does, and Claude tells you which one it picked.<\/p>\n\n<h3>Self-paced<\/h3>\n<p>Leave the interval out and Claude chooses the gap each time, based on what it saw. It waits less while a build is finishing and longer when nothing is happening. It prints the delay and the reason at the end of every pass, so you can see its thinking. A self-paced loop can also end itself once the work is done. Under the hood, Claude calls its <code>ScheduleWakeup<\/code> tool with <code>stop: true<\/code>. If a pass ends without either scheduling the next one or stopping, Claude Code sets one backup wakeup about 20 minutes later. If that pass doesn&#8217;t schedule anything either, the loop ends.<\/p>\n\n<h3>Bare \/loop and loop.md<\/h3>\n<p>A bare <code>\/\u74b0\u5f62<\/code> runs a built-in maintenance prompt. It finishes unfinished work, looks after the current branch&#8217;s PR (review comments, failed CI, merge conflicts), then does cleanup like bug hunts. It won&#8217;t start new projects. Risky steps like pushing or deleting only go ahead if the conversation already approved them.<\/p>\n<p>To use your own default prompt, create <code>.claude\/loop.md<\/code> \uff08\u6295\u5f71\u5100 <code>~\/.claude\/loop.md<\/code> (user). The project file wins if both exist. Write it like you&#8217;re typing the prompt. Changes take effect on the next pass, so you can adjust it while the loop runs. Anything past 25,000 bytes gets cut off.<\/p>\n\n<p>You can also loop a skill: <code>\/loop 20m \/review-pr 1234<\/code>. There&#8217;s a catch, though. A scheduled run only executes skills Claude is <em>allowed to call on its own<\/em>. Built-in commands like <code>\/model<\/code>, skills marked <code>disable-model-invocation: true<\/code>, and MCP prompts arrive as plain text instead of running. If your looped skill &#8220;does nothing&#8221;, check that first.<\/p>\n\n<h3>Stopping it<\/h3>\n<p>This one catches people out. A <strong>self-paced<\/strong> loop stops when you press <code>Esc<\/code> while it&#8217;s waiting. A <strong>fixed-interval<\/strong> loop ignores <code>Esc<\/code> \u548c <code>Ctrl+C<\/code>. You have to ask Claude to cancel it (&#8220;cancel the deploy check loop&#8221;), or it runs until the seven-day expiry. The tools underneath are <code>CronCreate<\/code>, <code>CronList<\/code> \u548c <code>CronDelete<\/code>. Each task gets an 8-character ID, and one session can hold up to 50.<\/p>\n\n<h2>The Fine Print: Jitter, the 7-Day Expiry, and What Happens When You Close the Lid<\/h2>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"752\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s3-20261026.jpg\" alt=\"An hourglass running out, standing in for the 7-day loop expiry\" class=\"wp-image-7621\" srcset=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s3-20261026.jpg 1344w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s3-20261026-768x430.jpg 768w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s3-20261026-18x10.jpg 18w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s3-20261026-600x336.jpg 600w\" sizes=\"auto, (max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n<p>Most of the top-ranking guides for this term skip these limits. Every one of them matters if you&#8217;re tempted to treat <code>\/\u74b0\u5f62<\/code> as a scheduler.<\/p>\n\n<figure class=\"wp-block-table\"><table>\n<thead><tr><th>\u884c\u70ba<\/th><th>What the docs say (Oct 2026)<\/th><th>\u9019\u5c0d\u4f60\u610f\u5473\u8457\u4ec0\u9ebc<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Session must be open<\/td><td>Tasks only fire while Claude Code is running and idle<\/td><td>Close the terminal and the loop stops. A background session can carry it.<\/td><\/tr>\n<tr><td>Busy session<\/td><td>A due prompt waits until the current turn ends<\/td><td>Your &#8220;every 5 minutes&#8221; can slip while Claude is mid-task<\/td><\/tr>\n<tr><td>Missed runs<\/td><td>No catch-up: fires once when idle, not once per missed interval<\/td><td>Don&#8217;t use it for anything that has to count runs<\/td><\/tr>\n<tr><td>Jitter (recurring)<\/td><td>Runs late by up to half the gap, capped at 30 minutes. Hourly or daily runs start 0\u201330 min late.<\/td><td>A &#8220;9am&#8221; daily check might run at 9:27<\/td><\/tr>\n<tr><td>Jitter (every 5 min)<\/td><td><code>*\/5<\/code> runs 4m45s after the previous run<\/td><td>Fast polls stay tight (they beat the 5-minute prompt cache)<\/td><\/tr>\n<tr><td>One-shot on :00 or :30<\/td><td>Can run up to 90 seconds early<\/td><td>Schedule reminders at odd minutes like <code>3 9 * * *<\/code><\/td><\/tr>\n<tr><td>Expiry<\/td><td>Recurring tasks fire one last time and delete themselves 7 days after creation<\/td><td>A weekly-forever job isn&#8217;t possible here<\/td><\/tr>\n<tr><td>Resume<\/td><td>Cron tasks are restored on <code>--resume<\/code>; a self-paced <code>\/\u74b0\u5f62<\/code> is not<\/td><td>Re-run <code>\/\u74b0\u5f62<\/code> after a restart<\/td><\/tr>\n<tr><td>\u7d42\u6b62\u958b\u95dc<\/td><td><code>CLAUDE_CODE_DISABLE_CRON=1<\/code> disables the scheduler and <code>\/\u74b0\u5f62<\/code><\/td><td>Useful in shared or CI environments<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n<p>Times use your <strong>local timezone<\/strong>, not UTC. The docs&#8217; own comparison table sets the floor at one minute for <code>\/\u74b0\u5f62<\/code>, one hour for cloud scheduled tasks, and one minute for Desktop tasks when Claude sets them (one hour in the form).<\/p>\n\n<blockquote><p>The seven-day expiry is a feature, not a bug. It&#8217;s there so a loop you forgot about can&#8217;t burn tokens for a month. If that limit annoys you, your job needs the outer loop.<\/p><\/blockquote>\n\n<p>Here&#8217;s the expiry against my own calendar. This container has been running for 137 days. A <code>\/\u74b0\u5f62<\/code> doing the same work would have expired and needed recreating about 19 times, and only while a terminal was open the whole time.<\/p>\n\n<style>#kt-layout-idsignup_mid > .kt-row-column-wrap{align-content:start;}:where(#kt-layout-idsignup_mid > .kt-row-column-wrap) > .wp-block-kadence-column{justify-content:start;}#kt-layout-idsignup_mid > .kt-row-column-wrap{column-gap:var(--global-kb-gap-md, 2rem);row-gap:var(--global-kb-gap-md, 2rem);padding-top:var( --global-kb-row-default-top, 25px );padding-bottom:var( --global-kb-row-default-bottom, 25px );padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;grid-template-columns:repeat(2, minmax(0, 1fr));}#kt-layout-idsignup_mid{border-top-left-radius:16px;border-top-right-radius:16px;border-bottom-right-radius:16px;border-bottom-left-radius:16px;overflow:clip;isolation:isolate;}#kt-layout-idsignup_mid > .kt-row-layout-overlay{border-top-left-radius:16px;border-top-right-radius:16px;border-bottom-right-radius:16px;border-bottom-left-radius:16px;}#kt-layout-idsignup_mid{background-color:#0d1117;}#kt-layout-idsignup_mid > .kt-row-layout-overlay{opacity:0.30;}@media all and (max-width: 1024px){#kt-layout-idsignup_mid > .kt-row-column-wrap{grid-template-columns:minmax(0, 1fr);}}@media all and (max-width: 767px){#kt-layout-idsignup_mid > .kt-row-column-wrap{grid-template-columns:repeat(2, minmax(0, 1fr));}}<\/style>\n<div class=\"wp-block-kadence-rowlayout alignnone\">\n<style>.kadence-columnsignup_img_mid > .kt-inside-inner-col{border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;}.kadence-columnsignup_img_mid > .kt-inside-inner-col,.kadence-columnsignup_img_mid > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-columnsignup_img_mid > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-columnsignup_img_mid > .kt-inside-inner-col{flex-direction:column;}.kadence-columnsignup_img_mid > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-columnsignup_img_mid > .kt-inside-inner-col:before{opacity:0.3;}.kadence-columnsignup_img_mid{position:relative;}@media all and (max-width: 1024px){.kadence-columnsignup_img_mid > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-columnsignup_img_mid > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column inner-column-1\"><div class=\"kt-inside-inner-col\">\n\n<figure class=\"wp-block-image size-medium\"><img decoding=\"async\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/06\/newsletter-cta-ai-playbook.jpg\" alt=\"\u6f5b\u5728\u5ba2\u6236\u958b\u767c\u4eba\u5de5\u667a\u6167\u7b56\u7565\u624b\u518a\uff0c\u71df\u904b\u5546\u7684\u4eba\u5de5\u667a\u6167\u81ea\u52d5\u5316\u7b56\u7565\u624b\u518a\" \/><\/figure>\n\n<\/div><\/div>\n\n<style>.kadence-columnsignup_txt_mid > .kt-inside-inner-col{border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;}.kadence-columnsignup_txt_mid > .kt-inside-inner-col,.kadence-columnsignup_txt_mid > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-columnsignup_txt_mid > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-columnsignup_txt_mid > .kt-inside-inner-col{flex-direction:column;}.kadence-columnsignup_txt_mid > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-columnsignup_txt_mid > .kt-inside-inner-col:before{opacity:0.3;}.kadence-columnsignup_txt_mid{position:relative;}@media all and (max-width: 1024px){.kadence-columnsignup_txt_mid > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-columnsignup_txt_mid > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column inner-column-2\"><div class=\"kt-inside-inner-col\">\n\n<h3 class=\"wp-block-heading has-text-color\" style=\"color:#00d4b4\">\u53d6\u5f97\u4eba\u5de5\u667a\u6167\u7b56\u7565\u624b\u518a<\/h3>\n\n\n<p class=\"has-text-color\" style=\"color:#f0f6fc\">The exact loops, timeouts and result lines behind 10 unattended businesses, plus whatever broke this week. Free, and you can leave whenever you like.<\/p>\n\n<div class='fluentform ff-default fluentform_wrapper_8 ffs_default_wrap'><form data-form_id=\"8\" id=\"fluentform_8\" class=\"frm-fluent-form fluent_form_8 ff-el-form-top ff_form_instance_8_1 ff-form-loading ffs_default\" data-form_instance=\"ff_form_instance_8_1\" method=\"POST\" action=\"\" ><fieldset  style=\"border: none!important;margin: 0!important;padding: 0!important;background-color: transparent!important;box-shadow: none!important;outline: none!important; min-inline-size: 100%;\">\n                    <legend class=\"ff_screen_reader_title\" style=\"display: block; margin: 0!important;padding: 0!important;height: 0!important;text-indent: -999999px;width: 0!important;overflow:hidden;\">\u5f15\u6d41\u5de5\u5177 - AI \u7b56\u7565\u624b\u518a<\/legend><input type='hidden' name='__fluent_form_embded_post_id' value='7626' \/><input type=\"hidden\" id=\"_fluentform_8_fluentformnonce\" name=\"_fluentform_8_fluentformnonce\" value=\"6862faafeb\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/zh\/wp-json\/wp\/v2\/posts\/7626\" \/><div class='ff-el-group'><div class='ff-el-input--content'><input type=\"email\" name=\"email\" id=\"ff_8_email\" class=\"ff-el-form-control\" placeholder=\"\u60a8\u7684\u96fb\u5b50\u90f5\u4ef6\u5730\u5740\" data-name=\"email\"  aria-invalid=\"false\" aria-required=\"true\"><\/div><\/div><div class='ff-el-group ff-text-left ff_submit_btn_wrapper ff_submit_btn_wrapper_custom'><button class=\"ff-btn ff-btn-submit ff-btn-md ff_btn_style wpf_has_custom_css\" type=\"submit\" name=\"custom_submit_button-8_1\" data-name=\"custom_submit_button-8_1\"  aria-label=\"\u53d6\u5f97\u64cd\u4f5c\u624b\u518a\">\u53d6\u5f97\u64cd\u4f5c\u624b\u518a<\/button><style>form.fluent_form_8 .wpf_has_custom_css.ff-btn-submit { background-color:#00ff88;border-color:#00ff88;color:#0a0a14;min-width:100%; }form.fluent_form_8 .wpf_has_custom_css.ff-btn-submit:hover { background-color:#00cc6a;border-color:#00cc6a;color:#0a0a14;min-width:100%; } <\/style><\/div><\/fieldset><input type=\"hidden\" name=\"trp-form-language\" value=\"zh\"\/><\/form><div id='fluentform_8_errors' class='ff-errors-in-stack ff_form_instance_8_1 ff-form-loading_errors ff_form_instance_8_1_errors'><\/div><\/div>            <script type=\"text\/javascript\">\n                window.fluent_form_ff_form_instance_8_1 = {\"id\":\"8\",\"settings\":{\"layout\":{\"labelPlacement\":\"top\",\"helpMessagePlacement\":\"with_label\",\"errorMessagePlacement\":\"inline\",\"asteriskPlacement\":\"asterisk-right\"},\"restrictions\":{\"denyEmptySubmission\":{\"enabled\":false}}},\"form_instance\":\"ff_form_instance_8_1\",\"form_id_selector\":\"fluentform_8\",\"rules\":{\"email\":{\"required\":{\"value\":true,\"message\":\"This field is required\"},\"email\":{\"value\":true,\"message\":\"Please enter a valid email address\"}}},\"debounce_time\":300};\n                            <\/script>\n            \n\n<\/div><\/div>\n\n<\/div>\n\n\n<h2>\/loop vs \/goal vs Stop Hooks vs the Ralph Loop<\/h2>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"752\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s4-20261026.jpg\" alt=\"A glowing path splitting into branches, standing in for choosing between loop tools\" class=\"wp-image-7622\" srcset=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s4-20261026.jpg 1344w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s4-20261026-768x430.jpg 768w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s4-20261026-18x10.jpg 18w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s4-20261026-600x336.jpg 600w\" sizes=\"auto, (max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n<p>&#8220;Claude Code loop&#8221; now covers four different tools. Here&#8217;s how to choose.<\/p>\n\n<h3>\/goal: loop until a condition is true<\/h3>\n<p><code>\/goal all tests in test\/auth pass and the lint step is clean<\/code> starts a turn right away. After each turn, a <em>separate<\/em> model checks whether the condition holds. If it doesn&#8217;t, Claude starts another turn. The goal clears when the condition is met, when the evaluator thinks it&#8217;s impossible, or when you run <code>\/goal clear<\/code>. You get one goal per session, and the condition can be up to 4,000 characters.<\/p>\n<p>Two details matter. First, the evaluator <strong>doesn&#8217;t run commands or read files itself<\/strong>. It only judges what Claude has put in the conversation. So write conditions Claude can prove with output, like &#8220;<code>npm test<\/code> exits 0&#8243;. Second, <code>\/goal<\/code> doesn&#8217;t change your permission mode. In Manual mode it still stops and asks before tool calls you haven&#8217;t allowed. Add a limit like &#8220;or stop after 20 turns&#8221; so it can&#8217;t run forever.<\/p>\n\n<h3>Stop hook: the permanent version of \/goal<\/h3>\n<p>A Stop hook also fires after every turn, but it lives in your settings file and applies to every session in that scope. It can run a script for checks that must be exact, or a prompt for checks that need judgment. Use <code>\/goal<\/code> for one-off work and a Stop hook for a rule you want every time.<\/p>\n\n<h3>The Ralph loop: bash around the whole thing<\/h3>\n<p>Before any of this was built in, people wrapped Claude in a shell <code>while<\/code> loop that kept feeding the same <code>PROMPT.md<\/code> into a fresh run. Geoffrey Huntley popularized the &#8220;Ralph&#8221; name for it. Each pass starts with a clean context and reads its progress from files on disk. It works, and it&#8217;s brutally simple. It also has no built-in stop rule, no budget cap and no schedule. You have to add all three yourself.<\/p>\n\n<figure class=\"wp-block-table\"><table>\n<thead><tr><th>You want to\u2026<\/th><th>\u4f7f\u7528<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Check something every few minutes while you work<\/td><td><code>\/loop 5m \u2026<\/code><\/td><\/tr>\n<tr><td>Babysit a PR without picking a cadence<\/td><td><code>\/loop \u2026<\/code> (self-paced)<\/td><\/tr>\n<tr><td>Grind until tests pass or the backlog is empty<\/td><td><code>\/goal \u2026<\/code> (with a turn cap)<\/td><\/tr>\n<tr><td>Enforce &#8220;never stop until X&#8221; in every session<\/td><td>Stop hook<\/td><\/tr>\n<tr><td>Run a big job in fresh contexts until it&#8217;s done<\/td><td>Ralph-style bash loop (add a cap)<\/td><\/tr>\n<tr><td>Run a job every day forever, laptop closed<\/td><td>Outer loop: cron + <code>\u514b\u52de\u5fb7-p<\/code>, cloud or Desktop scheduled tasks, or GitHub Actions<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n<h2>The Loop I Actually Run: Cron Plus a Fresh Claude Session, 1,800+ Times<\/h2>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"752\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s5-20261026.jpg\" alt=\"A rack of server units with cyan status lights and one amber light\" class=\"wp-image-7623\" srcset=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s5-20261026.jpg 1344w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s5-20261026-768x430.jpg 768w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s5-20261026-18x10.jpg 18w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s5-20261026-600x336.jpg 600w\" sizes=\"auto, (max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n<p>Here&#8217;s the Claude Code loop behind this site: an outer loop, and boring on purpose. A plain scheduler reads <code>schedule.json<\/code> and calls a shell dispatcher at each slot. The dispatcher starts a brand-new headless Claude Code session with one instruction: read this skill file and run it.<\/p>\n\n<pre><code>claude --print --dangerously-skip-permissions -p \"$INSTRUCTION\" &lt; \/dev\/null<\/code><\/pre>\n\n<p>That flag only makes sense because each brand runs in its own locked-down Docker container. I covered the setup in my <a href=\"https:\/\/jonjones.ai\/zh\/%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7\/%e5%85%8b%e5%8b%9e%e5%be%b7%e4%bb%a3%e7%a2%bc%e6%b2%99%e7%9b%92\/\">Claude Code sandbox write-up<\/a>. Don&#8217;t copy that line onto your laptop.<\/p>\n\n<h3>The numbers (measured from this container&#8217;s logs, October 26, 2026)<\/h3>\n<figure class=\"wp-block-table\"><table>\n<thead><tr><th>\u6307\u6a19<\/th><th>Value<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Run logs since June 12, 2026<\/td><td><strong>1,806<\/strong> across 137 days<\/td><\/tr>\n<tr><td>Active daily slots<\/td><td>12 (every one at :07 past the hour)<\/td><\/tr>\n<tr><td>Active weekly slots<\/td><td>10 (at :07 or :37, never on the hour)<\/td><\/tr>\n<tr><td>Per-slot timeout<\/td><td>30 to 90 minutes (this blog writer gets 90)<\/td><\/tr>\n<tr><td>Runs, Sep 26 \u2013 Oct 25<\/td><td>402 across 20 skills<\/td><\/tr>\n<tr><td>Ended <code>\u6210\u529f<\/code> \/ <code>\u8df3\u904e<\/code> \/ <code>\u5931\u6557<\/code><\/td><td>369 \/ 16 \/ 1<\/td><\/tr>\n<tr><td>No result line at all<\/td><td>16<\/td><\/tr>\n<tr><td><code>\/\u74b0\u5f62<\/code> \u6216\u8005 <code>\/goal<\/code> calls in production<\/td><td>0<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n<h3>Why the outer loop wins for unattended work<\/h3>\n<ul>\n<li><strong>Fresh context every run.<\/strong> Each job starts clean and reads what it needs from files: its skill, <a href=\"https:\/\/jonjones.ai\/zh\/%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7\/%e5%85%8b%e5%8b%9e%e5%be%b7%e9%86%ab%e5%ad%b8%e5%8d%9a%e5%a3%ab%e6%9c%80%e4%bd%b3%e5%af%a6%e8%b8%90\/\">CLAUDE.md<\/a> and a memory log. A session that loops for days piles up context. Mine never goes past one job.<\/li>\n<li><strong>A hard timeout per slot.<\/strong> If a run hangs, the scheduler kills it. A runaway <code>\/goal<\/code> only stops when the evaluator says so.<\/li>\n<li><strong>A lock per slot.<\/strong> The dispatcher writes a lock file named for the date, slot and task. Only the first one to arrive gets to run, and old locks are cleaned up daily. Two schedulers firing at once can&#8217;t publish two posts.<\/li>\n<li><strong>A result line you can count.<\/strong> Every skill must end with <code>SKILL_RESULT: success|skip|fail<\/code>. That&#8217;s how I can give you the table above. The 16 runs with no result line are my current weak spot. They exited cleanly, printed a nice summary, and skipped the one line a script can count.<\/li>\n<li><strong>Odd-minute slots.<\/strong> Nothing fires on the hour. Daily slots sit at :07, weekly ones at :07 or :37. That&#8217;s the same advice the docs give for one-shot tasks, and it keeps my jobs away from the top-of-the-hour rush on every API I call.<\/li>\n<\/ul>\n\n<p>So where does <code>\/\u74b0\u5f62<\/code> fit for me? In the interactive sessions where I change the fleet: watching a slow deploy, or babysitting a branch while I review something else. That&#8217;s exactly the job it was built for. One warning, though: unattended doesn&#8217;t mean unreviewed. My agents have filed hundreds of approval cards, and <a href=\"https:\/\/jonjones.ai\/zh\/%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7%e8%87%aa%e5%8b%95%e5%8c%96\/%e6%af%8f%e6%97%a5%e6%98%9f%e6%9c%9f%e4%b8%89%e6%99%ba%e6%85%a7%ef%bc%9a%e4%ba%ba%e6%a9%9f%e5%8d%94%e4%bd%9c%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7%e4%bb%a3%e7%90%86-2026%e5%b9%b410%e6%9c%8821%e6%97%a5\/\">\u53ea\u6709\u7576\u6709\u4eba\u5b8c\u6210\u9589\u74b0\u6642\uff0c\u5faa\u74b0\u4e2d\u7684\u4eba\u624d\u7b97\u6578\u3002<\/a>.<\/p>\n\n<p>If you want this outer-loop pattern running your own recurring work (content, inbox triage, lead follow-up) without the months of trial and error, that&#8217;s what my <a href=\"https:\/\/jonjones.ai\/zh\/%e9%a0%90%e7%b4%84%e6%9c%83%e8%ad%b0\/\">\u73fe\u6210\u7684\u81ea\u52d5\u5316\u69cb\u5efa<\/a> are for. The <a href=\"https:\/\/jonjones.ai\/zh\/%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7\/%e5%85%8b%e5%8b%9e%e5%be%b7%e4%bb%a3%e7%a2%bc%e6%9c%80%e4%bd%b3%e5%af%a6%e8%b8%90\/\">\u514b\u52de\u5fb7\u4ee3\u78bc\u6700\u4f73\u5be6\u8e10<\/a> post covers the rules I&#8217;d set up first.<\/p>\n\n<h2>Claude Code Loop Recipes You Can Copy Today<\/h2>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"752\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s6-20261026.jpg\" alt=\"A workbench with blank index cards and a small glass loop sculpture\" class=\"wp-image-7624\" srcset=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s6-20261026.jpg 1344w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s6-20261026-768x430.jpg 768w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s6-20261026-18x10.jpg 18w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s6-20261026-600x336.jpg 600w\" sizes=\"auto, (max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n<p>Five patterns, from the smallest to the biggest. Each one has a clear way to stop, because a Claude Code loop without one is just a bill.<\/p>\n\n<h3>1. Deploy watcher (fixed, short-lived)<\/h3>\n<pre><code>\/loop 2m check whether the production deploy finished. If it failed, pull the\nerror log and summarize the cause. When it succeeds or fails, tell me and\ncancel this loop.<\/code><\/pre>\n\n<h3>2. PR babysitter (self-paced)<\/h3>\n<pre><code>\/loop check PR 1234: if CI is red, read the failing job log and push the\nsmallest fix; if there are new review comments, address each one. If it's\ngreen and quiet, say so in one line. Stop when the PR is merged.<\/code><\/pre>\n\n<h3>3. A project loop.md<\/h3>\n<pre><code># .claude\/loop.md\nCheck the release\/next PR. Fix red CI with the smallest possible change.\nAnswer new review comments. Never push to main. Never delete branches.\nIf nothing needs doing, reply \"quiet\" and wait longer next time.<\/code><\/pre>\n\n<h3>4. Goal with a ceiling<\/h3>\n<pre><code>\/goal every file in src\/legacy\/ imports from the new api client, `npm test`\nexits 0, and no test file is modified, or stop after 25 turns and report\nwhat's left.<\/code><\/pre>\n\n<h3>5. The outer loop in about 10 lines<\/h3>\n<pre><code># crontab: 7 past every hour, never on the hour\n7 * * * * \/opt\/agents\/run-job.sh inbox-triage\n\n# run-job.sh\n#!\/usr\/bin\/env bash\nset -euo pipefail\nLOCK=\"\/tmp\/$(date +%F-%H)-$1.lock\"\n( set -o noclobber; : &gt; \"$LOCK\" ) 2&gt;\/dev\/null || exit 0\ntimeout 30m claude -p \"Read skills\/$1.md and run it. End with SKILL_RESULT: success|skip|fail\" \\\n  &lt; \/dev\/null &gt;&gt; \"\/var\/log\/agents\/$(date +%F_%H-%M)_$1.log\" 2&gt;&amp;1<\/code><\/pre>\n\n<p>Recipe 5 is a starter, not my exact script. Before you run it unattended, add permission rules (or a sandbox) and an alert. I send a <a href=\"https:\/\/jonjones.ai\/zh\/%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7%e8%87%aa%e5%8b%95%e5%8c%96\/%e6%af%8f%e6%97%a5%e5%b7%a5%e5%85%b7%e6%98%9f%e6%9c%9f%e5%9b%9b-telegram-%e6%a9%9f%e5%99%a8%e4%ba%ba-api-%e8%ad%a6%e5%a0%b1-2026-%e5%b9%b4-10-%e6%9c%88-8-%e6%97%a5\/\">Telegram message on every bad run<\/a>. And if a job keeps &#8220;checking in&#8221; without changing anything, read my numbers on <a href=\"https:\/\/jonjones.ai\/zh\/%e4%ba%ba%e5%b7%a5%e6%99%ba%e6%85%a7%e8%87%aa%e5%8b%95%e5%8c%96\/daily-faq-friday-proactive-ai-agent-2026-10-23\/\">whether proactive agents are worth it<\/a> before you add more loops.<\/p>\n\n<h2>Claude Code Loop FAQ<\/h2>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"752\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s7-20261026.jpg\" alt=\"A desk lamp over blank cards beside a glowing teal sphere\" class=\"wp-image-7625\" srcset=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s7-20261026.jpg 1344w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s7-20261026-768x430.jpg 768w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s7-20261026-18x10.jpg 18w, https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-s7-20261026-600x336.jpg 600w\" sizes=\"auto, (max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n<h3>How do I make Claude Code loop until a task is done?<\/h3>\n<p>\u4f7f\u7528 <code>\/goal<\/code> with a condition Claude can prove in its output, plus a turn limit. For example: &#8220;<code>npm test<\/code> exits 0, or stop after 20 turns.&#8221; Use <code>\/\u74b0\u5f62<\/code> without an interval if &#8220;done&#8221; is about time passing, like a deploy finishing. Claude can end a self-paced loop itself.<\/p>\n\n<h3>Does \/loop keep running after I close the terminal?<\/h3>\n<p>No. Session-scoped tasks only fire while Claude Code is running and idle. Moving the session to the background carries <code>\/\u74b0\u5f62<\/code> tasks over. For anything that has to survive a closed laptop, use cloud scheduled tasks, Desktop scheduled tasks, GitHub Actions, or cron with <code>\u514b\u52de\u5fb7-p<\/code>.<\/p>\n\n<h3>How do I stop a Claude Code loop?<\/h3>\n<p>For a self-paced loop, press <code>Esc<\/code> while it&#8217;s waiting. For a fixed-interval loop like <code>\/loop 5m<\/code>, ask Claude to cancel it, or ask &#8220;what scheduled tasks do I have?&#8221; and cancel by ID. <code>Esc<\/code> won&#8217;t stop those.<\/p>\n\n<h3>What&#8217;s the shortest interval?<\/h3>\n<p>One minute. Cron can&#8217;t go finer, so <code>30s<\/code> rounds up to <code>1m<\/code>.<\/p>\n\n<h3>Why did my loop expire?<\/h3>\n<p>Recurring session tasks delete themselves seven days after you create them, after one final run. Recreate it before then, or move the job to an outer loop.<\/p>\n\n<h3>Is \/loop the same as a Ralph loop?<\/h3>\n<p>No. <code>\/\u74b0\u5f62<\/code> re-runs a prompt inside one session on a timer. A Ralph-style loop is a shell <code>while<\/code> loop that starts a fresh Claude run each time, with progress saved in files. The Ralph loop gets a clean context every pass. <code>\/\u74b0\u5f62<\/code> keeps the session&#8217;s context, which helps for short monitoring and hurts over long runs.<\/p>\n\n<h3>Do loops cost more?<\/h3>\n<p>Every pass is a full model turn, so yes. That&#8217;s why self-paced loops wait longer when nothing&#8217;s happening and why <code>*\/5<\/code> polls start a bit early to stay inside the prompt cache. Cap turns on <code>\/goal<\/code>, cap time on outer loops, and cancel <code>\/\u74b0\u5f62<\/code> jobs you&#8217;ve stopped watching.<\/p>\n\n<h2>Final Thoughts: Pick the Loop by Who&#8217;s Watching<\/h2>\n<p>A Claude Code loop isn&#8217;t one feature. It&#8217;s a choice of <em>\u5728\u54ea\u88e1<\/em> the repeating happens. Inside a turn, Claude already loops for you. Inside a session, <code>\/\u74b0\u5f62<\/code> handles timing and <code>\/goal<\/code> handles finish lines, and both are excellent while you&#8217;re there to watch. Outside the session, a plain scheduler starting a fresh <code>\u514b\u52de\u5fb7-p<\/code> run is what keeps working at 3am. It&#8217;s run this site&#8217;s ten-brand fleet over 1,800 times without anyone watching.<\/p>\n<p>Start small. Put a <code>\/\u74b0\u5f62<\/code> on your next deploy. Once a job has run the same way for a week, move it to the outer loop and give it a timeout, a lock and a result line you can count. And if you&#8217;d rather skip the trial and error, <a href=\"https:\/\/jonjones.ai\/zh\/%e9%a0%90%e7%b4%84%e6%9c%83%e8%ad%b0\/\">\u9810\u7d04\u81ea\u52d5\u5316\u7b56\u7565\u6703\u8b70<\/a> and we&#8217;ll work out which of your jobs should loop at all.<\/p>\n\n<style>#kt-layout-idsignup_end > .kt-row-column-wrap{align-content:start;}:where(#kt-layout-idsignup_end > .kt-row-column-wrap) > .wp-block-kadence-column{justify-content:start;}#kt-layout-idsignup_end > .kt-row-column-wrap{column-gap:var(--global-kb-gap-md, 2rem);row-gap:var(--global-kb-gap-md, 2rem);padding-top:var( --global-kb-row-default-top, 25px );padding-bottom:var( --global-kb-row-default-bottom, 25px );padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;grid-template-columns:repeat(2, minmax(0, 1fr));}#kt-layout-idsignup_end{border-top-left-radius:16px;border-top-right-radius:16px;border-bottom-right-radius:16px;border-bottom-left-radius:16px;overflow:clip;isolation:isolate;}#kt-layout-idsignup_end > .kt-row-layout-overlay{border-top-left-radius:16px;border-top-right-radius:16px;border-bottom-right-radius:16px;border-bottom-left-radius:16px;}#kt-layout-idsignup_end{background-color:#0d1117;}#kt-layout-idsignup_end > .kt-row-layout-overlay{opacity:0.30;}@media all and (max-width: 1024px){#kt-layout-idsignup_end > .kt-row-column-wrap{grid-template-columns:minmax(0, 1fr);}}@media all and (max-width: 767px){#kt-layout-idsignup_end > .kt-row-column-wrap{grid-template-columns:repeat(2, minmax(0, 1fr));}}<\/style>\n<div class=\"wp-block-kadence-rowlayout alignnone\">\n<style>.kadence-columnsignup_img_end > .kt-inside-inner-col{border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;}.kadence-columnsignup_img_end > .kt-inside-inner-col,.kadence-columnsignup_img_end > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-columnsignup_img_end > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-columnsignup_img_end > .kt-inside-inner-col{flex-direction:column;}.kadence-columnsignup_img_end > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-columnsignup_img_end > .kt-inside-inner-col:before{opacity:0.3;}.kadence-columnsignup_img_end{position:relative;}@media all and (max-width: 1024px){.kadence-columnsignup_img_end > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-columnsignup_img_end > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column inner-column-1\"><div class=\"kt-inside-inner-col\">\n\n<figure class=\"wp-block-image size-medium\"><img decoding=\"async\" src=\"https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/06\/newsletter-cta-ai-playbook.jpg\" alt=\"\u6f5b\u5728\u5ba2\u6236\u958b\u767c\u4eba\u5de5\u667a\u6167\u7b56\u7565\u624b\u518a\uff0c\u71df\u904b\u5546\u7684\u4eba\u5de5\u667a\u6167\u81ea\u52d5\u5316\u7b56\u7565\u624b\u518a\" \/><\/figure>\n\n<\/div><\/div>\n\n<style>.kadence-columnsignup_txt_end > .kt-inside-inner-col{border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;}.kadence-columnsignup_txt_end > .kt-inside-inner-col,.kadence-columnsignup_txt_end > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-columnsignup_txt_end > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-columnsignup_txt_end > .kt-inside-inner-col{flex-direction:column;}.kadence-columnsignup_txt_end > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-columnsignup_txt_end > .kt-inside-inner-col:before{opacity:0.3;}.kadence-columnsignup_txt_end{position:relative;}@media all and (max-width: 1024px){.kadence-columnsignup_txt_end > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-columnsignup_txt_end > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column inner-column-2\"><div class=\"kt-inside-inner-col\">\n\n<h3 class=\"wp-block-heading has-text-color\" style=\"color:#00d4b4\">\u53d6\u5f97\u4eba\u5de5\u667a\u6167\u7b56\u7565\u624b\u518a<\/h3>\n\n\n<p class=\"has-text-color\" style=\"color:#f0f6fc\">\u6bcf\u9031\uff1a\u4ecb\u7d39\u8266\u968a\u4e2d\u7684\u4e00\u5957\u7cfb\u7d71\uff0c\u5b83\u7684\u6210\u672c\uff0c\u4ee5\u53ca\u8b93\u6211\u5b78\u5230\u6771\u897f\u7684\u65e5\u8a8c\u8981\u9ede\u3002\u7d55\u7121\u5ee2\u8a71\uff0c\u96a8\u6642\u53ef\u4ee5\u53d6\u6d88\u8a02\u95b1\u3002.<\/p>\n\n<div class='fluentform ff-default fluentform_wrapper_8 ffs_default_wrap'><form data-form_id=\"8\" id=\"fluentform_8\" class=\"frm-fluent-form fluent_form_8 ff-el-form-top ff_form_instance_8_2 ff-form-loading ffs_default\" data-form_instance=\"ff_form_instance_8_2\" method=\"POST\" action=\"\" ><fieldset  style=\"border: none!important;margin: 0!important;padding: 0!important;background-color: transparent!important;box-shadow: none!important;outline: none!important; min-inline-size: 100%;\">\n                    <legend class=\"ff_screen_reader_title\" style=\"display: block; margin: 0!important;padding: 0!important;height: 0!important;text-indent: -999999px;width: 0!important;overflow:hidden;\">\u5f15\u6d41\u5de5\u5177 - AI \u7b56\u7565\u624b\u518a<\/legend><input type='hidden' name='__fluent_form_embded_post_id' value='7626' \/><input type=\"hidden\" id=\"_fluentform_8_fluentformnonce\" name=\"_fluentform_8_fluentformnonce\" value=\"6862faafeb\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/zh\/wp-json\/wp\/v2\/posts\/7626\" \/><div class='ff-el-group'><div class='ff-el-input--content'><input type=\"email\" name=\"email\" id=\"ff_8_2_email\" class=\"ff-el-form-control\" placeholder=\"\u60a8\u7684\u96fb\u5b50\u90f5\u4ef6\u5730\u5740\" data-name=\"email\"  aria-invalid=\"false\" aria-required=\"true\"><\/div><\/div><div class='ff-el-group ff-text-left ff_submit_btn_wrapper ff_submit_btn_wrapper_custom'><button class=\"ff-btn ff-btn-submit ff-btn-md ff_btn_style wpf_has_custom_css\" type=\"submit\" name=\"custom_submit_button-8_1\" data-name=\"custom_submit_button-8_1\"  aria-label=\"\u53d6\u5f97\u64cd\u4f5c\u624b\u518a\">\u53d6\u5f97\u64cd\u4f5c\u624b\u518a<\/button><style>form.fluent_form_8 .wpf_has_custom_css.ff-btn-submit { background-color:#00ff88;border-color:#00ff88;color:#0a0a14;min-width:100%; }form.fluent_form_8 .wpf_has_custom_css.ff-btn-submit:hover { background-color:#00cc6a;border-color:#00cc6a;color:#0a0a14;min-width:100%; } <\/style><\/div><\/fieldset><input type=\"hidden\" name=\"trp-form-language\" value=\"zh\"\/><\/form><div id='fluentform_8_errors' class='ff-errors-in-stack ff_form_instance_8_2 ff-form-loading_errors ff_form_instance_8_2_errors'><\/div><\/div>            <script type=\"text\/javascript\">\n                window.fluent_form_ff_form_instance_8_2 = {\"id\":\"8\",\"settings\":{\"layout\":{\"labelPlacement\":\"top\",\"helpMessagePlacement\":\"with_label\",\"errorMessagePlacement\":\"inline\",\"asteriskPlacement\":\"asterisk-right\"},\"restrictions\":{\"denyEmptySubmission\":{\"enabled\":false}}},\"form_instance\":\"ff_form_instance_8_2\",\"form_id_selector\":\"fluentform_8\",\"rules\":{\"email\":{\"required\":{\"value\":true,\"message\":\"This field is required\"},\"email\":{\"value\":true,\"message\":\"Please enter a valid email address\"}}},\"debounce_time\":300};\n                            <\/script>\n            \n\n<\/div><\/div>\n\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Claude Code \u5faa\u74b0\u6307\u5357\uff1a\/loop \u548c \/goal \u7684\u5de5\u4f5c\u539f\u7406\u3001\u5927\u591a\u6578\u6307\u5357\u5ffd\u7565\u7684\u6296\u52d5\u548c 7 \u5929\u904e\u671f\u6642\u9593\uff0c\u4ee5\u53ca 1800 \u591a\u6b21\u7121\u4eba\u503c\u5b88\u904b\u884c\u80cc\u5f8c\u7684 cron \u5faa\u74b0\u3002.<\/p>","protected":false},"author":2,"featured_media":7617,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[28,64,46],"tags":[248,87,102,53,312],"class_list":["post-7626","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-software-development","category-tutorials","tag-agentic-workflows","tag-ai-agents","tag-autonomous-ai-agents","tag-claude-code-2","tag-claude-code-loop"],"taxonomy_info":{"category":[{"value":28,"label":"AI"},{"value":64,"label":"Software Development"},{"value":46,"label":"Tutorials"}],"post_tag":[{"value":248,"label":"agentic workflows"},{"value":87,"label":"ai agents"},{"value":102,"label":"autonomous ai agents"},{"value":53,"label":"claude code"},{"value":312,"label":"claude code loop"}]},"featured_image_src_large":["https:\/\/jonjones.ai\/wp-content\/uploads\/2026\/10\/claudecodeloop-feat-20261026-1.jpg",1344,752,false],"author_info":{"display_name":"Jon Jones","author_link":"https:\/\/jonjones.ai\/zh\/author\/jonjonjones-ai\/"},"comment_info":0,"category_info":[{"term_id":28,"name":"AI","slug":"ai","term_group":0,"term_taxonomy_id":28,"taxonomy":"category","description":"","parent":0,"count":104,"filter":"raw","cat_ID":28,"category_count":104,"category_description":"","cat_name":"AI","category_nicename":"ai","category_parent":0},{"term_id":64,"name":"Software Development","slug":"software-development","term_group":0,"term_taxonomy_id":64,"taxonomy":"category","description":"","parent":0,"count":30,"filter":"raw","cat_ID":64,"category_count":30,"category_description":"","cat_name":"Software Development","category_nicename":"software-development","category_parent":0},{"term_id":46,"name":"Tutorials","slug":"tutorials","term_group":0,"term_taxonomy_id":46,"taxonomy":"category","description":"","parent":0,"count":28,"filter":"raw","cat_ID":46,"category_count":28,"category_description":"","cat_name":"Tutorials","category_nicename":"tutorials","category_parent":0}],"tag_info":[{"term_id":248,"name":"agentic workflows","slug":"agentic-workflows","term_group":0,"term_taxonomy_id":248,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":87,"name":"ai agents","slug":"ai-agents","term_group":0,"term_taxonomy_id":87,"taxonomy":"post_tag","description":"","parent":0,"count":45,"filter":"raw"},{"term_id":102,"name":"autonomous ai agents","slug":"autonomous-ai-agents","term_group":0,"term_taxonomy_id":102,"taxonomy":"post_tag","description":"","parent":0,"count":6,"filter":"raw"},{"term_id":53,"name":"claude code","slug":"claude-code-2","term_group":0,"term_taxonomy_id":53,"taxonomy":"post_tag","description":"","parent":0,"count":51,"filter":"raw"},{"term_id":312,"name":"claude code loop","slug":"claude-code-loop","term_group":0,"term_taxonomy_id":312,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/posts\/7626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/comments?post=7626"}],"version-history":[{"count":0,"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/posts\/7626\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/media\/7617"}],"wp:attachment":[{"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/media?parent=7626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/categories?post=7626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jonjones.ai\/zh\/wp-json\/wp\/v2\/tags?post=7626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}