Skip to content

Harden Codex stop gate supervision - #662

Draft
gon7187 wants to merge 19 commits into
openai:mainfrom
gon7187:codex/gate-supervision
Draft

Harden Codex stop gate supervision#662
gon7187 wants to merge 19 commits into
openai:mainfrom
gon7187:codex/gate-supervision

Conversation

@gon7187

@gon7187 gon7187 commented Aug 19, 2026

Copy link
Copy Markdown

Summary

  • make tracked Codex jobs crash-safe and prevent cancelled or removed work from resurrecting
  • serialize state mutations, reconcile dead workers, and make cancellation outcomes authoritative
  • make the Stop review gate fail closed, single-flight, and reusable for the exact Claude response

Root cause

The detached worker could start before its queued record was durable. Mutable lifecycle writes, SessionEnd cleanup, cancellation, and concurrent Stop hooks could then race, leaving queued zombies, duplicate reviews, or stale ALLOW output.

Verification

  • npm test — 138/138 passing
  • npm run build
  • npm run check-version
  • node --check on every changed .mjs file
  • git diff --check origin/main...HEAD
  • independent architecture and code-quality reviews found no Critical or Important issues

Deliberate tradeoff

A zero-byte .removed tombstone is retained per retired job. It is the smallest daemon-free guarantee that a paused late worker cannot publish or run after removal; mutable job files, logs, and lifecycle sidecars are still cleaned up.

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