codex/codex-rs/ext/goal
Eric Traut 0735c51978 Block goals after three empty automatic continuation turns (#44320)
## Why

Automatic goal continuations can repeatedly return empty final answers without
making progress. Stop this loop by marking the goal as `blocked` after three
consecutive empty turns with no other activity.

## What changed

- Observe completed turn items through a new `on_item_completed` lifecycle hook.
- Track empty final answers only for automatically admitted goal turns, resetting
  the streak on activity, user turns, or goal changes.
- Preserve normal turn completion and streamed message deltas when blocking a goal.

## Testing

Add accounting coverage for the three-turn threshold and streak resets, plus
app-server tests for empty continuations and recovery through final-answer text,
commentary, or tool activity.

GitOrigin-RevId: 4b9d2cb2e306b0adc316972429cc35000115b88b
History 2026-09-09 22:27:37 +00:00
..
src Block goals after three empty automatic continuation turns (#44320) 2026-09-09 22:27:37 +00:00
templates/goals Allow user-requested goal pauses through update_goal (#44290) 2026-09-09 20:03:38 +00:00
tests Block goals after three empty automatic continuation turns (#44320) 2026-09-09 22:27:37 +00:00
BUILD.bazel Make the update_plan tool opt-in (#41744) 2026-08-31 00:53:30 +00:00
Cargo.toml Extract persisted history types into a dedicated crate (#37871) 2026-08-10 19:26:52 +00:00