codex icon indicating copy to clipboard operation
codex copied to clipboard

app-server: allow dynamicTools to be updated after thread/start

Open Alan01252 opened this issue 6 months ago • 2 comments

What variant of Codex are you using?

App Server

What feature would you like to see?

Codex app-server currently accepts dynamicTools only on thread/start.

Please add an app-server API to update the dynamic tool registry after thread creation, and ideally make newly-added tools available at the next model continuation boundary within the active turn.

My use case for this is sometimes I start a large conversation/feature and then half way through think, wow now I want to use this tool, but with the current app-server endpoints I am unable to do this.

Also sometimes I don't want a tool available to a model for every single turn for security reasons etc.

Additional information

No response

Alan01252 avatar May 27 '26 18:05 Alan01252

Additional reproduction confirming that this remains unresolved in the released App Server 0.146.1:

  • The generated experimental protocol types from 0.145.0 and 0.146.1 are identical for ThreadStartParams, ThreadResumeParams, TurnStartParams, and DynamicToolSpec.
  • dynamicTools exists only on thread/start; there is still no typed field on thread/resume or turn/start.
  • The generated 0.147.0-alpha.13 protocol has the same limitation.
  • Current main also still defines dynamic_tools only on ThreadStartParams: https://github.com/openai/codex/blob/main/codex-rs/app-server-protocol/src/protocol/v2/thread.rs

I also reproduced the runtime behavior with a real isolated App Server 0.146.1:

  1. Start a durable thread with a dynamic tool whose description identifies it as version 1.
  2. Inspect the stored thread metadata and confirm version 1.
  3. Send thread/resume through raw JSON-RPC with an additional dynamicTools field containing version 2.
  4. App Server returns a successful resume response rather than Invalid params.
  5. Inspect the stored thread metadata again: version 1 remains and version 2 was not applied.

The extra field is therefore silently ignored. A successful thread/resume response cannot be used as evidence that a supplied tool-registry update became active. For long-lived integrations this leaves the old definition active without a detectable protocol error, so changing or removing a tool currently requires a new thread.

The public documentation currently says that persisted tools are restored on resume “when you do not supply new dynamic tools,” which implies that supplying replacements is possible, although no such resume field exists: https://learn.chatgpt.com/docs/app-server#start-or-resume-a-thread

It would help if the resolution covered both parts:

  1. Add a typed, versionable way to replace or clear the dynamic-tool registry on an existing thread, with an observable acknowledgement of the active registry.
  2. Until that exists, clarify the documentation and preferably reject unsupported dynamicTools fields on thread/resume instead of silently accepting and ignoring them.

The test was isolated to the local App Server protocol; it did not involve a model call, iPhone client, or remote WebSocket.

Samvibed avatar Aug 06 '26 14:08 Samvibed

Any update on this? also looking for this

ztalarick avatar Nov 24 '26 18:11 ztalarick