Skip to content

Resume pending Codex command and file edit approvals after a worker restart - #6115

Merged
markstuart-oai merged 2 commits into
feature/codex-operation-tracingfrom
fix/resume-native-codex-approval
Nov 21, 2026
Merged

markstuart-oai merged 2 commits into
feature/codex-operation-tracingfrom
fix/resume-native-codex-approval

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When a worker dies before an approval arrives, the app can't safely guess which command or file edit to retry. With Runner.run(..., session=...), a replacement worker can now load that exact call from Redis and approve or deny it. Codex checks current permissions and refuses to overwrite a file that changed while it was waiting.

Merge after #6105 and #6106. Reapply these 16 files to feat/simple-codex once both land, then run wheel CI on that target.

Test plan

Before the replay fix, two requests with the same call ID wrote two lines after one approval. With the fix, the file stays at one line.

The installed Linux wheel passed 10 process and 5 Kubernetes restart cases. Denials left files untouched. After a pod died just after writing, its replacement didn't write again. The node and Redis stayed up.

Issue number

None.

Checks

  • Added regression tests for commands and edits.
  • Full SDK verification passed (format, lint, types, tests).

@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners November 21, 2026 02:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T03:06:30.821497Z 96c70b5 New commits
🔒 Security Review ✅ Completed 2026-11-21T03:08:51.015178Z 96c70b5 New commits

Security findings

Advisory findings (1)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@markstuart-oai
markstuart-oai force-pushed the fix/resume-native-codex-approval branch from eb7ebf6 to 4963122 Compare November 21, 2026 02:56
@markstuart-oai
markstuart-oai changed the base branch from tmp/native-approval-prerequisites to feature/codex-operation-tracing November 21, 2026 02:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 4963122441

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after independent static reviews of the current commit. Reviewed durable checkpoint ownership and immutable native receipts, streaming checkpoint acknowledgement, fresh per-call decisions, current permission and tool availability checks, file preconditions, native restoration without a model turn, cancellation/unknown-outcome handling, and the regression coverage. The existing repeated-call-ID finding is addressed: completed or executed invocations are rejected before native dispatch, and Core also enforces one execution per restored call. No remaining actionable findings.

Hosted checks: 2 skipped, 19 success. No native wheel CI job is shown for this stacked target. The process/Kubernetes results in the PR description are author-reported, not runs performed by this reviewer. Retain the planned re-review and native wheel CI check after reapplying/retargeting to feat/simple-codex following #6105 and #6106. Static review only; no candidate code or local tests executed.

@markstuart-oai
markstuart-oai merged commit 4d10726 into feature/codex-operation-tracing Nov 21, 2026
23 checks passed
@markstuart-oai
markstuart-oai deleted the fix/resume-native-codex-approval branch November 21, 2026 04:23
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