Skip to content

Pause goals after repeated transport failures#19

Open
ruizkinio wants to merge 1 commit into
prevalentWare:mainfrom
ruizkinio:codex-goal-alignment
Open

Pause goals after repeated transport failures#19
ruizkinio wants to merge 1 commit into
prevalentWare:mainfrom
ruizkinio:codex-goal-alignment

Conversation

@ruizkinio

Copy link
Copy Markdown

Summary

Align automatic goal continuation with native Codex-style pause semantics when the provider stops answering.

  • cap consecutive unresolved transport/no-response attempts at three
  • pause the goal on the third failure instead of scheduling a fourth retry
  • reset the failure episode only after substantive progress or explicit /goal resume
  • suppress duplicate idle events and recursive watchdog re-arming
  • keep quota, interruption, context-overflow, and other terminal errors on their existing paths
  • preserve the upstream OpenTUI function API and max_turn_time behavior

Why

A live connection outage caused one goal session to issue 4,066 automatic continuations until a downstream alias limit was exhausted. Goal mode should stop safely when the model cannot answer and wait for an explicit resume, rather than retrying indefinitely.

Validation

  • 109 tests pass
  • lint passes
  • typechecks against OpenCode 1.17.17 and 1.18.x pass
  • build and npm package dry-run pass
  • regression coverage includes exact live socket/header-timeout errors, duplicate idle events, watchdog ceilings, incomplete tool shells, substantive progress resets, and explicit resume
  • independent review found no remaining issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant