Skip to content

fix: fail closed on invalid callable approval arguments - #3867

Merged
seratch merged 2 commits into
mainfrom
fix/fail-closed-callable-tool-approval
Jul 17, 2026
Merged

seratch merged 2 commits into
mainfrom
fix/fail-closed-callable-tool-approval

Conversation

@seratch

@seratch seratch commented Jul 17, 2026

Copy link
Copy Markdown
Member

This pull request fixes callable function-tool approval policies that could fail open when model arguments contained malformed or non-object JSON.

Runner and Realtime now treat arguments that cannot be inspected as requiring approval without invoking the policy callback. Valid JSON objects continue through the existing callable approval flow unchanged. Regression coverage verifies both the fail-closed behavior and the valid-object path for directly constructed FunctionTool instances.

This pull request resolves #3863.

@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: 34bf9ae705

ℹ️ 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 src/agents/util/_approvals.py Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Callable needs_approval fails open when tool arguments are invalid JSON

1 participant