Skip to content

Make turn recovery progress-aware - #3495

Open
morganmcg1 wants to merge 2 commits into
mainfrom
codex/progress-aware-turn-recovery
Open

Make turn recovery progress-aware#3495
morganmcg1 wants to merge 2 commits into
mainfrom
codex/progress-aware-turn-recovery

Conversation

@morganmcg1

@morganmcg1 morganmcg1 commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • classify Senpai's one-hour OpenHands lease boundary as a resumable paused_timeout while preserving genuine provider/runtime failures
  • measure terminal stalling from the last successful persisted tool observation and reset consecutive retry/recovery allowance only on genuine progress
  • quarantine only the poisoned inbox turn, continue later student/GitHub events once on a fresh branch, and publish queued post-quarantine work as degraded-but-live health
  • migrate existing inbox state with chain-aware recovery counts and normalize naïve persisted SDK timestamps as UTC
  • make recovery selection, progress-budget evaluation, reset, and quarantine one atomic transition while preserving processed/quarantined terminal states and making stale duplicate requests idempotent
  • document the durable recovery contract in the README and specification

Verification

  • uv run pytest -q — 904 passed, 6 skipped
  • focused recovery/controller/OpenHands/supervisor suite — 111 passed
  • targeted red/green proofs for lease pauses, quarantine continuation, chain migration, timestamp normalization, concurrent progress, terminal states, and stale duplicate recovery
  • uv run python -m compileall -q senpai_agent
  • bash -n k8s/*.sh scripts/*.sh plugins/senpai/scripts/*.sh
  • uv lock --check
  • git diff --check

Two independent read-only reviews completed. Their findings around poisoned-context isolation, prequeued-event health, failed tool observations, timeout-test stability, naïve local timestamps, migration ancestry, recovery races, terminal-state monotonicity, and stale duplicate calls are covered by the final implementation and regression tests.

@morganmcg1
morganmcg1 marked this pull request as ready for review August 11, 2026 09:42
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