<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Long-Running Tasks on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/long-running-tasks/</link>
        <description>Recent content in Long-Running Tasks on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Tue, 26 May 2026 23:44:37 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/long-running-tasks/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Codex Goal Deep Dive: A Goal-Driven Workflow That Lets AI Agents Work for Hours</title>
        <link>https://knightli.com/en/2026/05/26/codex-goal-persistent-goals-ai-agent-long-running-workflow/</link>
        <pubDate>Tue, 26 May 2026 23:44:37 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/26/codex-goal-persistent-goals-ai-agent-long-running-workflow/</guid>
        <description>&lt;p&gt;AI Agents in browsers, terminals, and IDEs are getting better at writing code. But the real pain point for many developers is no longer &amp;ldquo;it cannot do the task.&amp;rdquo; It is &amp;ldquo;it stops halfway and says it is done.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Small tickets are a good fit for coding agents: fix a button, add an endpoint, change a short piece of copy, or add one test. The target is clear, the boundary is small, and verification is straightforward. But once the task becomes a large migration, a cross-module refactor, a failing test suite, a dependency upgrade, or prompt eval optimization, an Agent can easily fall into a familiar pattern:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It reaches a plausible intermediate state, then stops too early.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Codex Goal / Persistent Goals are meant to address exactly this premature-stop problem. The point is not to make the Agent run more rounds. The point is to make the Agent keep moving toward a clear objective until verifiable completion criteria are met.&lt;/p&gt;
&lt;h2 id=&#34;codex-goal-is-about-stop-conditions-not-loops&#34;&gt;Codex Goal Is About Stop Conditions, Not Loops
&lt;/h2&gt;&lt;p&gt;Many long-running automation attempts start with a rough instruction:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Keep checking the code and fixing issues until there are no errors.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Or in a more mechanical form:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Loop 10 times:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;1. Run tests
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;2. Ask the model to fix failures
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;3. Run tests again
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This kind of rough loop can keep an Agent busy for longer, but it has two serious problems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It does not know when it should truly stop.&lt;/li&gt;
&lt;li&gt;It does not know whether &amp;ldquo;no more visible errors&amp;rdquo; is the same as &amp;ldquo;the task is complete.&amp;rdquo;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The key to Codex Goal is not the number of iterations. It is the combination of goal, state, and judge stop condition. The Agent needs to know what it is trying to achieve, how far it has progressed, and what evidence proves the task is actually finished.&lt;/p&gt;
&lt;p&gt;That is the real dividing line for long-running Agents: not &amp;ldquo;can it take more steps,&amp;rdquo; but &amp;ldquo;can it tell what is still missing.&amp;rdquo;&lt;/p&gt;
&lt;h2 id=&#34;goal-vs-ordinary-prompt&#34;&gt;Goal vs. Ordinary Prompt
&lt;/h2&gt;&lt;p&gt;An ordinary prompt feels like a one-off instruction:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Fix the tests in this project.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;A Goal prompt is closer to a small task contract:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Goal: Fix the failing tests in the current repository.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Scope: Only modify src/ and tests/. Do not change build scripts.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Definition of done: npm test passes fully, and the changes introduce no lint errors.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Verification command: npm test &amp;amp;&amp;amp; npm run lint.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;If blocked: After 3 failed attempts, report the remaining failing cases, attempted fixes, and blockers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Output: Summarize changed files, root causes, and verification results.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The biggest difference is that the Goal prompt defines what &amp;ldquo;done&amp;rdquo; means.&lt;/p&gt;
&lt;p&gt;Without a definition of done, the Agent can confuse &amp;ldquo;I changed the code&amp;rdquo; with &amp;ldquo;I completed the task.&amp;rdquo; With clear completion criteria, the Agent has to keep working against external evidence such as tests, logs, diffs, build output, and eval scores.&lt;/p&gt;
&lt;h2 id=&#34;why-llm-judge-stop-conditions-matter&#34;&gt;Why LLM Judge Stop Conditions Matter
&lt;/h2&gt;&lt;p&gt;The hardest part of a long task is not making the Agent run commands. It is making it decide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is the task actually done?&lt;/li&gt;
&lt;li&gt;Did only a local test pass?&lt;/li&gt;
&lt;li&gt;Did a fix introduce another problem?&lt;/li&gt;
&lt;li&gt;Should it keep searching, run another verification step, or roll back a direction?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is where an LLM judge stop condition becomes valuable.&lt;/p&gt;
&lt;p&gt;Ideally, the Agent should not only check whether the last command exited with code 0. It should also reason over:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;whether every user-provided completion criterion has been satisfied;&lt;/li&gt;
&lt;li&gt;whether changes stayed within the allowed scope;&lt;/li&gt;
&lt;li&gt;whether tests, lint, build, and evals were actually run;&lt;/li&gt;
&lt;li&gt;whether failure logs still contain unresolved items;&lt;/li&gt;
&lt;li&gt;whether the change introduces obvious side effects or risks;&lt;/li&gt;
&lt;li&gt;whether the final report gives a human enough evidence to review quickly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In other words, the judge does not merely declare success. It also prevents the Agent from ending with self-comforting optimism.&lt;/p&gt;
&lt;h2 id=&#34;tasks-that-fit-goal-well&#34;&gt;Tasks That Fit Goal Well
&lt;/h2&gt;&lt;p&gt;Codex Goal / Persistent Goals are especially useful for complex coding work that requires multiple rounds of exploration and verification:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code migration: moving from an old framework to a new one, from CommonJS to ESM, or from an old API to a new API.&lt;/li&gt;
&lt;li&gt;Large refactors: splitting modules, cleaning boundaries, replacing duplicated implementations, and reducing complexity.&lt;/li&gt;
&lt;li&gt;Test repair: analyzing failing cases, identifying causes, fixing them, and repeatedly verifying the result.&lt;/li&gt;
&lt;li&gt;Dependency upgrades: upgrading frameworks, SDKs, or build tools while handling breaking changes.&lt;/li&gt;
&lt;li&gt;Prompt eval optimization: running evals, inspecting failure samples, and adjusting prompts or tool-calling behavior.&lt;/li&gt;
&lt;li&gt;Technical debt cleanup: replacing old patterns under a clear rule while preserving behavior.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These tasks all have many intermediate states. The failure cause may not be obvious on the first pass, and completion depends on verification.&lt;/p&gt;
&lt;h2 id=&#34;tasks-that-should-not-rely-on-goal-alone&#34;&gt;Tasks That Should Not Rely on Goal Alone
&lt;/h2&gt;&lt;p&gt;Goal is not magic. These tasks are risky if handled with only one long prompt:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The target is vague, such as &amp;ldquo;improve product growth.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;The cycle is long, such as SEO, GEO, or ad optimization over several weeks.&lt;/li&gt;
&lt;li&gt;The work requires cross-system scheduling across content, data, ads, support, and business metrics.&lt;/li&gt;
&lt;li&gt;The task involves production risk, such as database changes, live configuration, finance operations, or account permissions.&lt;/li&gt;
&lt;li&gt;There is no verification mechanism: no tests, no metrics, no logs, and no human acceptance criteria.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are closer to Missions than Goals.&lt;/p&gt;
&lt;p&gt;A Goal works well for hour-scale or one-to-two-day deep execution. A Mission needs state, history, scheduling, human approval, staged reviews, and long-term metrics. SEO / GEO / Ads optimization, for example, is not just &amp;ldquo;make the Agent write content or adjust parameters in a loop.&amp;rdquo; It needs persistent records of strategy, experiments, data changes, and next actions.&lt;/p&gt;
&lt;h2 id=&#34;a-template-for-better-goal-prompts&#34;&gt;A Template for Better Goal Prompts
&lt;/h2&gt;&lt;p&gt;A useful Goal prompt should include at least these parts:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;23
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Goal:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;State the final outcome in one sentence.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Background:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Explain the current problem, related files, business constraints, and previous attempts.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Scope:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;List which directories, files, and modules may be changed, and which must not be touched.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Definition of done:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;List verifiable completion criteria.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Verification commands:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Specify tests, lint, build, evals, or scripts to run.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Failure strategy:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;If completion is not possible, ask the Agent to report causes, attempted approaches, and remaining blockers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Risk boundaries:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Require human confirmation for destructive actions, production config, secrets, databases, or external services.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Delivery format:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ask for a summary of changes, verification results, risks, and follow-up suggestions.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;What determines the quality of a long-running task is often not how elegant the prompt sounds. It is whether the completion criteria are hard enough.&lt;/p&gt;
&lt;h2 id=&#34;why-goal-buddy-helps&#34;&gt;Why Goal Buddy Helps
&lt;/h2&gt;&lt;p&gt;Many long-running tasks fail not because the Agent is weak, but because the human did not define the task clearly enough at the start.&lt;/p&gt;
&lt;p&gt;A helper such as Goal Buddy is valuable because it prepares the goal, boundaries, completion criteria, and verification plan before the task is handed to the Agent. It acts like a task preflight checklist and asks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What visible result should this task produce?&lt;/li&gt;
&lt;li&gt;Which directories can be changed, and which are off limits?&lt;/li&gt;
&lt;li&gt;Which command proves success?&lt;/li&gt;
&lt;li&gt;If the task fails, should the Agent keep trying, and how far?&lt;/li&gt;
&lt;li&gt;Should the work be split into staged commits?&lt;/li&gt;
&lt;li&gt;Which actions require human approval?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This may feel verbose, but it greatly reduces the chance of the Agent drifting, stopping too early, or producing a large diff that is hard to review.&lt;/p&gt;
&lt;h2 id=&#34;practical-advice-for-codex-claude-code-and-opencode-users&#34;&gt;Practical Advice for Codex, Claude Code, and OpenCode Users
&lt;/h2&gt;&lt;p&gt;If you are using Codex, Claude Code, OpenCode, OpenClaw, or a similar coding agent, use long-running tasks this way:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Commit the current workspace first so you have a clean rollback point.&lt;/li&gt;
&lt;li&gt;Write the request as a Goal, not a vague instruction.&lt;/li&gt;
&lt;li&gt;Define what may and may not be changed.&lt;/li&gt;
&lt;li&gt;Provide verification commands, ideally commands the Agent can run after each round.&lt;/li&gt;
&lt;li&gt;Require the Agent to report blockers when it cannot finish instead of inventing a success state.&lt;/li&gt;
&lt;li&gt;Put human confirmation around high-risk operations such as deleting files, changing databases, or touching deployment config.&lt;/li&gt;
&lt;li&gt;Only accept a final result that includes test results and a change summary.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The right way to use a long-running Agent is not &amp;ldquo;let it do whatever overnight.&amp;rdquo; It is to give it a clear target, solid guardrails, and a verifiable exit.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Codex Goal / Persistent Goals move coding agents from &amp;ldquo;execute one instruction&amp;rdquo; toward &amp;ldquo;keep working toward an objective.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;They fit complex but bounded engineering tasks: migrations, refactors, test fixes, dependency upgrades, and eval optimization. They are a poor fit for vague, long-cycle business work without verification criteria; those should be designed as Mission systems instead.&lt;/p&gt;
&lt;p&gt;The future competition among AI Agents may not be only about which model writes better code. It may be about which Agent can keep moving toward a goal, judge the right stopping point, and leave enough evidence for humans to review.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.bilibili.com/video/BV1a3LF6fE2D/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Codex Goal 深度解析：让 AI Agent 连续工作数小时，不再提前摆烂&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://openai.com/index/introducing-the-codex-app/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Introducing the Codex app&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
