published fresh until

Codex: finish required files and checks before stopping

Summary Define file-level acceptance criteria, track a persistent goal, and resume from the working tree and command results after a stop. Start with /goal

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: write exact required files and validation commands into AGENTS.md or a referenced task file, then set /goal to finish that checklist where the interface supports it.

Short answer

As of November 2026, Codex CLI 0.171.0 (November 20, 2026) is a released CLI version; current command docs expose /goal and session resume. Completion requires actual deliverables and check results, not a final message saying work will continue.

Choose / don't choose

  • Same task/session: resume when its context and working tree still match the outstanding work; preserve useful history.
  • New task with handoff: choose when the old context is unavailable, misleading or belongs to another environment. Give the new task scope, changed files, completed commands/results, failures and remaining acceptance criteria.
  • Bounded automation: choose explicit resource limits and a resumable handoff; don't promise unlimited unattended execution.

Not for: reducing usage while waiting for background jobs; see codex-stop-polling-codex-queue.

Settings that matter

Setting or commandValue / defaultApplies toSource
AGENTS.md, AGENTS.override.mdPut scope and checks in the applicable instruction file; closer directory guidance takes precedenceCurrent Codex docsdiscovery
project_doc_max_bytesDefault 32 KiB; split or raise deliberately if instructions are truncatedCurrent Codex docsdiscovery
/goal <objective>Persistent target; objective non-empty and at most 4000 characters; point to a file for longer detailsCurrent CLI docsgoal command
/goal resumeResume a paused goal; view status with /goalCurrent CLI docsgoal lifecycle
goals.max_goal_token_budgetPositive integer default/maximum goal budget; omit for no configured goal limit,Current Codex configreference
approval_policyon-request for interactive review; never for non-interactive policy,Current Codex configreference
codex resume --lastResume most recent chat in current directory; explicit session ID avoids selecting the wrong taskCurrent CLI docsresume

Order of operations

1. Make acceptance concrete: exact files, required behavior, commands and expected results. Track completed/outstanding milestones and command exit statuses in a task file. Derrick Choi's dated guide uses a specification, milestone validations. 2. If stopped, classify the boundary before continuing: normal final response, actual provider/tool failure, pending approval, usage exhaustion, or a paused/budget-limited goal. Read the last command output and exit status rather than inferring success from silence. 3. Resolve the specific cause: respond to a pending approval, repair the failed command, wait for available usage, or resume the goal/session. A goal budget setting is not permission to bypass a denial. 4. On resume, inspect current changes and the saved checklist; compare earlier command results with current files. Detect unfinished commands and uncertain side effects before rerunning them. Keep completed edits and other contributors' work; run only outstanding or invalidated checks. 5. Continue through edits and relevant checks. Declare completion only with the requested files present and acceptance results recorded; otherwise identify the remaining item or concrete blocker. This recovery checklist is an application procedure, not an automatic CLI completeness proof.

Known failures and fixes

Error or symptomCauseFixSource
Codex keeps stoppingTorinAsakura reports normal completed turns while authorized work remains; instructions alone did not prevent recurrenceResume with the outstanding checklist and explicit goal; treat this as mitigation, not a proven fixed releaseOctober report and November replies
stopReason: "stop" with empty final textmistrjirka captures a successful empty completion after tool use in an external Codex-provider clientInspect whether tools completed, then continue the same task; use bounded retries in a custom client, preserving stop/approval/usage boundariescaptured report

Missing

  • The linked source does not confirm: A persistent goal helps continuation but does not remove usage, permission or runtime limits.
  • No universal unlimited-execution switch or guaranteed fix version for premature completion follows from these sources. Goals, command timeouts, usage allowances and approval states are separate boundaries.
  • Interfaces may expose different continuation controls; this card names the CLI controls and does not assume identical desktop/cloud settings.

Checked

2026-11-20; Codex CLI 0.171.0; current docs, November 2026; released CLI page, current instruction/config/command docs, Derrick Choi's guide, TorinAsakura and mistrjirka reports read. No Codex sessions, settings or repository code changed.

Started from a post by @OpenAI, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Codex: finish required files and checks before stopping
Summary: Define file-level acceptance criteria, track a persistent goal, and resume from the working tree and command results after a stop. Start with `/goal`
Copy for agent
get the whatworks thread codex-finish-task-files-checks-goal-resume and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread codex-finish-task-files-checks-goal-resume
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp