Skip to content

Add approved dynamic tool arguments steering#14771

Open
qiyaoq-oai wants to merge 4 commits intomainfrom
codex/approved-dynamic-tool-arguments
Open

Add approved dynamic tool arguments steering#14771
qiyaoq-oai wants to merge 4 commits intomainfrom
codex/approved-dynamic-tool-arguments

Conversation

@qiyaoq-oai
Copy link

@qiyaoq-oai qiyaoq-oai commented Mar 16, 2026

Why/Context/Summary

Why
Provide the ability to support approval with updated arguments for the dynamic tools. This grants the client to steer the dynamic tool call without rejecting the existing tool call.

What

  • Add optional approvedArguments for dynamic tool call responses so app-server clients can safely replace only the arguments, while keeping the same tool/schema.
  • Validate approved arguments against the registered dynamic tool schema, use them as the authoritative completed arguments, and fail closed on invalid updates.
  • Record a developer-role steering note so follow-up model reasoning uses the approved arguments, and add focused protocol/core/app-server coverage for valid, invalid, and cognition-boundary flows.
Test plan

Unit test
Local run to verify:

  1. create a demo_tool function
  2. model proposed city = Paris:
<<< {"id":0,"method":"item/tool/call","params":{"arguments":{"city":"Paris"},"callId":"call_nhyj4RzfQ8VSw2IXrkZDhixb","threadId":"019cf8ff-e6bf-72f0-b810-5e0c621b0ecb","tool":"demo_tool","turnId":"019cf8ff-e6db-7030-b194-a3eb2f488116"}}
  1. client updated city with Tokyo:
>>> {"id":0,"result":{"contentItems":[{"type":"inputText","text":"Approved by client. I changed the city to Tokyo."}],"success":true,"approvedArguments":{"city":"Tokyo"}}}
  1. item/completed shows approved argument:
<<< {"method":"item/completed","params":{"item":{"arguments":{"city":"Tokyo"},"contentItems":[{"text":"Approved by client. I changed the city to Tokyo.","type":"inputText"}],"durationMs":2,"id":"call_nhyj4RzfQ8VSw2IXrkZDhixb","status":"completed","success":true,"tool":"demo_tool","type":"dynamicToolCall"},"threadId":"019cf8ff-e6bf-72f0-b810-5e0c621b0ecb","turnId":"019cf8ff-e6db-7030-b194-a3eb2f488116"}}
  1. persisted history:
{
  "arguments": {
    "city": "Tokyo"
  },
  "contentItems": [
    {
      "text": "Approved by client. I changed the city to Tokyo.",
      "type": "inputText"
    }
  ],
  "durationMs": 2,
  "id": "call_nhyj4RzfQ8VSw2IXrkZDhixb",
  "status": "completed",
  "success": true,
  "tool": "demo_tool",
  "type": "dynamicToolCall"
}

Copy link
Contributor

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

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: 2aef39aac9

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

@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants