app-server: allow dynamicTools to be updated after thread/start
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
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, andDynamicToolSpec. dynamicToolsexists only onthread/start; there is still no typed field onthread/resumeorturn/start.- The generated 0.147.0-alpha.13 protocol has the same limitation.
- Current
mainalso still definesdynamic_toolsonly onThreadStartParams: 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:
- Start a durable thread with a dynamic tool whose description identifies it as version 1.
- Inspect the stored thread metadata and confirm version 1.
- Send
thread/resumethrough raw JSON-RPC with an additionaldynamicToolsfield containing version 2. - App Server returns a successful resume response rather than
Invalid params. - 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:
- 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.
- Until that exists, clarify the documentation and preferably reject unsupported
dynamicToolsfields onthread/resumeinstead 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.
Any update on this? also looking for this