Skip to content

feat(agent): durable context-aware tool approvals - #4961

Merged
asim merged 2 commits into
masterfrom
codex/4936-durable-tool-approvals
Sep 21, 2026
Merged

asim merged 2 commits into
masterfrom
codex/4936-durable-tool-approvals

Conversation

@asim

@asim asim commented Sep 21, 2026

Copy link
Copy Markdown
Member

Pending tool approvals currently rely on a synchronous boolean hook and cannot safely preserve the proposed call across a restart. Add context-aware approved/denied/pending decisions, persisted approval IDs and exact call arguments, and ResumeApproval to record a decision before executing the saved call. Plain Resume keeps pending approvals paused. Continuations reuse checkpointed results, and approval persistence errors fail closed. Existing ApproveTool remains supported.

Tests cover approval and denial after recreation, argument preservation, blocking later calls, continuation timeouts without repeated effects, and checkpoint failure. Targeted tests, repository build and lint pass. Documentation explains caller authorization and the existing checkpoint/at-least-once limits; this does not add distributed leases or exactly-once effects.

Closes #4936.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T07:55:44.064415Z e95d7b9 PR opened
ℹ️ 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.

@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 Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e95d7b9aac

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread agent/agent.go Outdated
@asim
asim merged commit ec0cf9d into master Sep 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] agent: ApproveFunc is synchronous and an approved call isn't replayed on resume

1 participant