[Bug]: t3_queue reorder can't move a message to the end: the advertised schema drops `null` from `beforeRunId`
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Queue two or more messages on a thread.
- From an agent, call the MCP tool
t3_queuewithaction: "reorder"andbeforeRunId: null, as its description says ("reorder: beforebeforeRunId, or to the end with null"). - Look at the input schema T3 advertises for
t3_queue.
Expected behavior
beforeRunId is advertised as string or null, and null moves the message to the end of the queue.
Actual behavior
The advertised schema has beforeRunId: { "type": "string" }. QueueTool declares beforeRunId: Schema.optional(Schema.NullOr(RunId)) (apps/server/src/mcp/toolkits/thread/tools.ts:99), and compact in apps/server/src/mcp/advertisedJsonSchema.ts (#25423) drops the null branch of optional properties. So an agent that follows the schema can't send null. Ours sent the string "null", which the server read as a run id and answered "Failed to reorder". The handler still treats null as "to the end", so only the advertised schema is wrong. advertisedJsonSchema.test.ts covers a required NullOr field, not this optional one.
Possible fix: keep the null branch when null has a meaning (here beforeRunId), and add this shape to advertisedJsonSchema.test.ts.
Impact
Major degradation or frequent failure
Version or commit
main @ a760f374f
Environment
No response
Logs or stack traces
Failed to reorder
Screenshots, recordings, or supporting files
No response
Workaround
Move each message queued after it to before it, one by one.