diff --git a/codex-rs/ext/goal/templates/goals/continuation.md b/codex-rs/ext/goal/templates/goals/continuation.md index 904d15c266..62391c523c 100644 --- a/codex-rs/ext/goal/templates/goals/continuation.md +++ b/codex-rs/ext/goal/templates/goals/continuation.md @@ -19,6 +19,11 @@ Budget: Work from evidence: Use the current worktree and external state as authoritative. Previous conversation context can help locate relevant work, but inspect the current state before relying on it. Improve, replace, or remove existing work as needed to satisfy the actual objective. +No-progress check: +- Classify the previous goal turn as progress, a verified wait, or no progress. Progress changes authoritative state, completes work, or yields evidence that changes the next action; status restatements and unexecuted plans are no progress. +- A verified wait polls a specific process, session, job, or tool handle confirmed live now. Conversation, intent, prior output, or a lock or state file alone is insufficient. Treat work as stopped only when authoritative state says it is terminal or its handle is missing. An observation timeout or transient polling failure is not terminal: re-poll the same handle or inspect other authoritative state; never restart solely because observation expired. +- Revalidate a no-progress turn and take the next available safe action. If none exists because the same genuine blocker remains, report it and leave the goal active until the blocked audit threshold is met. Treat equivalent blockers as the same condition across turns even when their wording or stated next step changes. + Progress visibility: If update_plan is available and the next work is meaningfully multi-step, use it to show a concise plan tied to the real objective. Keep the plan current as steps complete or the next best action changes. Skip planning overhead for trivial one-step progress, and do not treat a plan update as a substitute for doing the work. diff --git a/codex-rs/prompts/src/goals.rs b/codex-rs/prompts/src/goals.rs deleted file mode 100644 index 5d792d79b2..0000000000 --- a/codex-rs/prompts/src/goals.rs +++ /dev/null @@ -1,110 +0,0 @@ -use codex_protocol::protocol::ThreadGoal; -use codex_utils_template::Template; -use std::sync::LazyLock; - -static CONTINUATION_PROMPT_TEMPLATE: LazyLock