Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Start a thread on the Cursor provider with
gemini-4-carbon(reasoning effort High). - Ask it to get feedback from two subagents at a set effort, e.g. "Get feedback from Fable 5.2 high and GPT-6 Astra high using subagents."
- The model calls
orchestrator_capabilities, thendelegate_taskwithtarget.optionssent as a JSON-encoded string instead of an object:"target": { "providerInstanceId": "codex_…", "driverKind": "codex", "model": "gpt-6-astra", "options": "{\"reasoningEffort\":\"high\"}" }
Expected behavior
The model sees why the call failed (target.options must be an object or an array of {id, value}) and fixes it on the next call. Or the server accepts a JSON-encoded string for options, which is unambiguous.
Actual behavior
The server rejects the call correctly, but the model only ever sees Tool execution error. The server trace has the useful message:
effect/ai/McpSchema/InvalidParams: Invalid parameters for tool 'delegate_task': Expected array | object | null
at ["target"]["options"]
It is sent as a JSON-RPC protocol error, and Cursor reduces protocol errors to a generic string. Without the message, the model guessed. It made 6 failed delegate_task calls in one thread and 8 in another, trying options: [0, 0], [0], [1], [5] and [42], some with placeholder tasks ("x", "placeholder"). Each attempt got the same opaque error, and Cursor's auto-review blocked two of the probes. The model then left out options entirely, and the call went through.
Result: the children run at the model default, not the effort the user asked for. Both Astra children show modelSelection: {instanceId, model} with no options, so they ran at Astra's default (medium). Their titles still say "GPT-6 Astra High", and the parent told the user they ran at High. In both threads the model also moved Fable from the claudeAgent instance to cursor while trying to get a call through.
A newer MCP spec revision recommends returning input validation errors as tool results with isError: true, so the model can read them and correct itself. Doing that for delegate_task (and other T3 tools) would have fixed this on the second call.
Impact
Major degradation or frequent failure
Version or commit
T3 Code (Beta) desktop 0.1.8
Environment
macOS 26 (Darwin 25.6), Cursor provider (cursor-agent), parent model gemini-4-carbon at reasoning effort High; children on Codex (gpt-6-astra) and Claude (claude-fable-5-2).
Logs or stack traces
mcp.tool.delegate_task exit=Failure
ProtocolError: Invalid parameters for tool 'delegate_task': Expected array | object | null
at ["target"]["options"]
at fromTool (apps/server/dist/server-CezNjU8O.mjs:38935:10)
mcp.tool.delegate_task exit=Failure
ProtocolError: Invalid parameters for tool 'delegate_task': Expected object
at ["target"]["options"][0]What the parent model received for each of these: {"message": "Tool execution error"}.
Workaround
Tell the model to pass options as an object, e.g. {"reasoningEffort": "high"}, or leave it out and accept the default effort.
Related: #21655 (another Gemini and T3 tool schema problem, different tool and error), #32850 (option names differ per provider).
Activity
sasanktumpati commentedon Nov 24, 2026
Additional reproduction: all Cursor-hosted models, including side chats (
0.1.12-nightly.20261123.5165, macOS)TL;DR. On the Cursor provider, no model can get a valid
target.optionsintodelegate_task. This isn't specific to Gemini Carbon: it reproduces withgemini-4-neon,claude-opus-5-5andclaude-fable-5-2on Cursor. The server's validation message never reaches the model. Every thread ends up the same way: it dropsoptions, the call succeeds, and the effort the user asked for is lost without any notice.Numbers (one user, last 7 days of provider logs)
delegate_taskcalls in 6 threads hosted on Cursor, including 1 side chat (forked withcontextHandoff.prepareSideChatContext).claudeAgent) threads over the same period. Those threads passoptionswithout trouble.{"status":"error","error":{"message":"Tool execution error"}}.target.optionsvalues the model sentgemini-4-neon[null, null],[1, 1],[true, false],trueclaude-opus-5-5[null],[false],[false, true],trueclaude-fable-5-2[null]Matching server spans:
Why I think it's the schema, not the model
orchestrator_capabilitiesreturned this for Cursor'sclaude-fable-5-2:{"id":"effort","values":["low","medium","high","xhigh","max"],"default":"high"}. The user had asked for "extra high", so the intended value was clearly[{"id":"effort","value":"xhigh"}].nullwith the same length as the intended array, or booleans. That's what you'd expect if Cursor reducesoptions.anyOf[0].items(an object withidandvalue, wherevalueis itselfanyOf: [string, boolean]) to an untyped or empty schema. [Bug]: Cursor harness (gemini-4-neon) cannot passmodelSelection.optionstot3_thread_launch(objects serialize as[null], JSON strings rejected) #41591 reports the same[null]serialization fort3_thread_launch.modelSelection.options, and [Bug]: Gemini on Vertex AI rejects T3 Code's MCP tools because model selection fields have no JSON Schema type #21655 is the Vertex variant of the same problem.What the model does when it only sees "Tool execution error"
A typical sequence from one side chat (timestamps UTC):
Other threads show the same pattern, with probe tasks like
"dummy","x"and"test"(some of which really are dispatched as child tasks once a call gets through). It cost 2 to 5 wasted calls per attempt.Second, related problem: inherited effort doesn't carry across models
The parent was
gemini-4-neonwithinheritedOptions: [{id:"reasoning_effort",value:"xhigh"}], while the child's option is namedeffort. Because the ids differ, nothing carried over, and the child fell back to the model default (high). So even "omitoptionsand inherit" doesn't keep the effort level when the child uses a different model.Suggested fixes, roughly in order of value
InvalidParamsas a tool result (CallToolResultwithisError: trueand the message text) instead of a JSON-RPC-32602error. Cursor shows the text of tool results but replaces protocol errors with a generic string. This one change would make every other harness-specific schema problem fixable by the model itself.target.optionsa single, flat shape that survives schema conversion. For example, onlytype: "object"withadditionalProperties: {"type":"string"}, with booleans as"true"/"false". Alternatively, accept a JSON-encoded string as well. Or add flat fields such astarget.effort, which is the option people want to set nearly every time.delegate_taskresult (e.g.appliedOptions: [{id:"effort",value:"high",source:"model-default"}]). That would let the parent notice and report that the requested effort was dropped.reasoning_effort↔effort↔reasoningEffort), or report in the result that the inherited value didn't apply.optionsout rather than guess, which would avoid the placeholder-task probing.I can provide redacted trace or provider-log excerpts if that helps.