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 using the Cursor provider with
gemini-4-neon.
- Ask the agent to launch a new top-level thread on another model with an explicit reasoning effort option (e.g.,
claudeAgent / claude-opus-5-5 with effort: "xhigh").
- The agent inspects
orchestrator_capabilities and GetDynamicTools (t3-code / t3_thread_launch), then invokes t3_thread_launch via Cursor's CallDynamicTool with:
- Attempt A:
modelSelection.options as an object ({"effort": "xhigh"}) or an array of objects ([{"id": "effort", "value": "xhigh"}]).
- Attempt B:
modelSelection.options as a JSON-encoded string ("{\"effort\":\"xhigh\"}").
Expected behavior
t3_thread_launch launches the new top-level thread with claude-opus-5-5 and options: [{"id": "effort", "value": "xhigh"}] (or accepts a JSON-encoded string fallback for modelSelection.options when harnesses fail to serialize untyped nested objects).
Actual behavior
gemini-4-neon on Cursor has no way to pass modelSelection.options to t3_thread_launch:
- Object / array form (
{"effort": "xhigh"} or [{"id": "effort", "value": "xhigh"}]): Cursor's CallDynamicTool serializes the depth-3 nested modelSelection.options value as [null] before it reaches the t3-code MCP server (note that t3_thread_launch's advertised JSON Schema declares modelSelection.options as {"anyOf": [{}, {"type": "null"}]}). The MCP server rejects it:
Error: Tool execution error. MCP error -32602: Invalid parameters for tool 't3_thread_launch': Expected object
at ["modelSelection"]["options"][0]
- JSON-encoded string form (
"{\"effort\":\"xhigh\"}"): The string reaches the MCP server intact, but ModelSelectionSource rejects strings:
Error: Tool execution error. MCP error -32602: Invalid parameters for tool 't3_thread_launch': Expected array | object
at ["modelSelection"]["options"]
Note: Depth-2 nested objects with primitive fields (e.g., workspaceStrategy: {type: "worktree", baseRef: "main", branch: "...", startFromOrigin: false}) serialize cleanly. The failure specifically hits modelSelection.options (which is shared with t3_thread_configure).
Two complementary fixes on T3 Code's side:
- Give
ModelSelectionSource's fields explicit JSON Schema types (as proposed in fix(contracts): MCP model selection fields declare their JSON Schema types #35208 for [Bug]: Gemini on Vertex AI rejects T3 Code's MCP tools because model selection fields have no JSON Schema type #21655).
- Accept a JSON-encoded string for
options in ModelSelectionSource (parsing it into the same object/array wire shape), as also suggested in [Bug]: delegate_task's validation error reaches Cursor models only as "Tool execution error", so Gemini Carbon can't set child effort #35713 — that immediately unblocks harnesses/models whose dynamic tool-call wrapper struggles with untyped nested objects.
Impact
Major degradation or frequent failure
Version or commit
T3 Code (Beta) 0.1.2
Environment
macOS (Darwin 27.2.0), T3 Code (Beta) 0.1.2, Cursor provider (gemini-4-neon, reasoning_effort=high, contextWindow=300k), attempting to launch claudeAgent / claude-opus-5-5 with effort: "xhigh".
Logs or stack traces
# Attempt with JSON-encoded string "{\"effort\":\"xhigh\"}":
Error: Tool execution error. MCP error -32602: Invalid parameters for tool 't3_thread_launch': Expected array | object
at ["modelSelection"]["options"]
# Attempts with object {"effort": "xhigh"} and array [{"id": "effort", "value": "xhigh"}]
# (serialized over the wire as options: [null]):
Error: Tool execution error. MCP error -32602: Invalid parameters for tool 't3_thread_launch': Expected object
at ["modelSelection"]["options"][0]
Workaround
Create the new thread manually in the UI with the desired model and effort, or omit modelSelection.options (which silently falls back to the model's default effort, e.g., medium on claude-opus-5-5).
Related: #21655 (and open PR #35208 giving ModelSelectionSource fields explicit JSON Schema types), #35713 (similar Cursor + Gemini options friction on delegate_task, where accepting a JSON-encoded string was also suggested).