Skip to content

feat(app-server): add ThreadItem::DynamicToolCall#12732

Merged
owenlin0 merged 5 commits intomainfrom
owen/dynamic_tool_call_item
Feb 25, 2026
Merged

feat(app-server): add ThreadItem::DynamicToolCall#12732
owenlin0 merged 5 commits intomainfrom
owen/dynamic_tool_call_item

Conversation

@owenlin0
Copy link
Collaborator

Previously, clients would call thread/start with dynamic_tools set, and when a model invokes a dynamic tool, it would just make the server->client item/tool/call request and wait for the client's response to complete the tool call. This works, but it doesn't have an item/started or item/completed event.

Now we are doing this:

  • [new] emit item/started with DynamicToolCall populated with the call arguments
  • send an item/tool/call server request
  • [new] once the client responds, emit item/completed with DynamicToolCall populated with the response.

Also, with persistExtendedHistory: true, dynamic tool calls are now reconstructable in thread/read and thread/resume as ThreadItem::DynamicToolCall.

@owenlin0 owenlin0 marked this pull request as ready for review February 25, 2026 01:45
@owenlin0
Copy link
Collaborator Author

@codex review

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: f0e1279e24

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

@owenlin0
Copy link
Collaborator Author

@codex review

@owenlin0 owenlin0 requested a review from jif-oai February 25, 2026 04:40
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

| EventMsg::DynamicToolCallRequest(_)

P1 Badge Handle DynamicToolCallResponse in codex_tool_runner match

Add EventMsg::DynamicToolCallResponse to the large match in run_codex_tool_session. This commit introduces a new EventMsg variant, but this exhaustive match still enumerates DynamicToolCallRequest only. Building codex-mcp-server against the updated codex-protocol will fail with a non-exhaustive pattern error.

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

@owenlin0 owenlin0 requested a review from celia-oai February 25, 2026 17:33
@owenlin0 owenlin0 merged commit a0fd94b into main Feb 25, 2026
33 checks passed
@owenlin0 owenlin0 deleted the owen/dynamic_tool_call_item branch February 25, 2026 20:00
@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants