Skip to content

Stop retrying unrecoverable native sessions - #70

Merged
laotoutou merged 1 commit into
mainfrom
agent/terminalize-unrecoverable-native-session
Aug 5, 2026
Merged

Stop retrying unrecoverable native sessions#70
laotoutou merged 1 commit into
mainfrom
agent/terminalize-unrecoverable-native-session

Conversation

@laotoutou

Copy link
Copy Markdown
Contributor

Summary

  • terminalize a native Session after three consecutive same-epoch codex_native_session_unrecoverable responses
  • atomically clear stale active/pending control state and mark the product Session failed
  • preserve retries for transport and other transient failures so normal long-running work is unaffected
  • document the terminal reconciliation path and its compare-and-swap protections

Root cause

An unreadable Codex rollout caused every thread/read reconciliation to return codex_native_session_unrecoverable. Sandpi treated that explicit permanent failure like a transient error forever, leaving active/pending state set and preventing the Environment idle-pause guard from succeeding.

Validation

  • npm test — 703 passed
  • npm run lint
  • npm run typecheck
  • npm run openapi:check
  • npm run build

@laotoutou
laotoutou marked this pull request as ready for review August 5, 2026 18:45
@laotoutou
laotoutou merged commit 1ce0909 into main Aug 5, 2026
4 checks passed
@laotoutou
laotoutou deleted the agent/terminalize-unrecoverable-native-session branch August 5, 2026 19:43
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.

2 participants