fix(operator): guard Codex background automation continuity - #65
fix(operator): guard Codex background automation continuity#65urbanplanningpros wants to merge 28 commits into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Two new continuity deltas require executable coverage before production promotion: 1. Fork-boundary contamination —
|
Summary
Testing
|
New official continuity delta: fractional rate-limit values can truncate projected thread historyUpstream Add executable coverage before production promotion:
Required fixtures:
|
July 30 delegated-task compaction updateAdded executable coverage for merged upstream Codex change New files:
The guard verifies that remote-v2 compaction retains bounded active delegated-agent messages, excludes completion messages, accounts for encrypted delegated content in token estimates, restores initial and delegated context before the latest real message, and strips inherited parent-agent messages when forking a child. It blocks automatic respawn or mutation replay and requires canonical-thread and external-write reconciliation before continuing only the exact unfinished action through the same thread, guarded single-agent execution, or an approved local/Linux route. Local Run: node scripts/operator/codex-delegated-compaction-continuity-guard.mjs \
--input /approved/task/codex-delegated-compaction-evidence.json \
--json
node scripts/operator/codex-delegated-compaction-continuity-guard-selftest.mjsNo excluded provider, gateway, automatic selector, Bedrock, Vertex, or Copilot route was introduced. |
July 30 delta: approval integrity and non-interactive session continuityNew upstream findings require three additional boundaries before this PR can receive production authority:
Required deterministic fixtures:
No source-file change is claimed by this comment; it records the executable patch and fixture requirements for the existing continuity branch. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Issue for this PR
Tracks Codex continuity and operator-safety failures reported in upstream issues, including
openai/codex#36141,openai/codex#36157,openai/codex#36160, and stale collaboration-mode state on resume inopenai/codex#36161. Repository issues are disabled, so an internalFixes #...link cannot currently be created; the existingneeds:issuepolicy blocker remains.Type of change
What this PR does
Adds continuity guards for background automations, Worktrees, app-server interruption, remote control, context handoff, sidebar continuation, session-residency anomalies, delegated compaction, parent/child ownership, Linux mount-namespace startup, oversized saved-task payloads, and resumed-thread collaboration-mode drift.
All guards preserve task, operation, idempotency, repository, approval, and external-write receipts; reject automatic replay or unsafe replacement before reconciliation; allow bounded continuation through direct OpenAI control or explicitly approved local/Linux execution; and reject prohibited providers, gateways, automatic selectors, Bedrock, Vertex, and Copilot routing.
Linux unreachable-CWD guard —
openai/codex#36160Added:
scripts/operator/codex-linux-unreachable-cwd-continuity-guard.mjsscripts/operator/codex-linux-unreachable-cwd-continuity-guard-selftest.mjsThe guard detects app-server startup under a Linux working directory beginning with
(unreachable)/or an equivalent nested-mount-namespace ENOENT failure. It rejects prefix stripping, inherited/nsenter --wd-only recovery, and relaunch loops. Recovery requires an explicitchdir()inside the effective namespace or a verified approved local/Linux executor, plus canonical cwd verification, readable config paths, startup canaries, checkpoint preservation, and state/write reconciliation.Oversized saved-task guard —
openai/codex#36157Added:
scripts/operator/codex-saved-task-payload-continuity-guard.mjsscripts/operator/codex-saved-task-payload-continuity-guard-selftest.mjsThe guard detects renderer serialization failures and image-heavy saved-task payload pressure. It blocks automatic reopening, task replay, and destructive cleanup; preserves the original task outside automatic resume paths; and permits continuation from verified workspace files, a compact checkpoint with images externalized into hashed artifacts, or a verified approved local/Linux executor.
Plan Mode resume guard —
openai/codex#36161Added:
scripts/operator/codex-plan-mode-resume-continuity-guard.mjsscripts/operator/codex-plan-mode-resume-continuity-guard-selftest.mjsThe guard compares requested, client-visible, tool/backend, and injected collaboration modes after a resume. When Default is displayed but Plan constraints remain injected, it blocks mutations in the affected thread, preserves and hashes the source state, reconciles repository and external writes, rejects replay and inherited fork/continue paths, and permits the exact unfinished action only through a fresh Default thread with a compact checkpoint or an explicitly approved local/Linux route.
Run
Verification status
node --checkpassed locally for the new Plan Mode guard and self-test.Checklist
needs:issuepolicy blocker resolved or repository issue-first policy adjusted for disabled issuesSanitized-Manifest: codex-background-automation-continuity-2026-07-30
Allowed-Paths: scripts/operator/codex-background-automation-continuity-guard.mjs, scripts/operator/codex-background-automation-continuity-guard-selftest.mjs, docs/operator/codex-background-automation-continuity.md, scripts/operator/codex-sidebar-continuation-guard.mjs, scripts/operator/codex-sidebar-continuation-guard-selftest.mjs, docs/operator/codex-sidebar-continuation.md, scripts/operator/codex-windows-voice-session-continuity-guard.mjs, scripts/operator/codex-windows-voice-session-continuity-guard-selftest.mjs, docs/operator/codex-windows-voice-session-continuity.md, scripts/operator/codex-session-residency-continuity-guard.mjs, scripts/operator/codex-session-residency-continuity-guard-selftest.mjs, docs/operator/codex-session-residency-continuity.md, scripts/operator/codex-delegated-compaction-continuity-guard.mjs, scripts/operator/codex-delegated-compaction-continuity-guard-selftest.mjs, scripts/operator/codex-parent-child-turn-continuity-guard.mjs, scripts/operator/codex-parent-child-turn-continuity-guard-selftest.mjs, scripts/operator/codex-linux-unreachable-cwd-continuity-guard.mjs, scripts/operator/codex-linux-unreachable-cwd-continuity-guard-selftest.mjs, scripts/operator/codex-saved-task-payload-continuity-guard.mjs, scripts/operator/codex-saved-task-payload-continuity-guard-selftest.mjs, scripts/operator/codex-plan-mode-resume-continuity-guard.mjs, scripts/operator/codex-plan-mode-resume-continuity-guard-selftest.mjs