You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: t3_queue reorder can't move a message to the end: the advertised schema drops null from beforeRunId #30303
I searched existing issues and did not find a duplicate.
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_queue with action: "reorder" and beforeRunId: null, as its description says ("reorder: before beforeRunId, 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.
Activity