Repository navigation
Description
Summary
Any bb thread on Cursor's cursor-grok-4.6-* models fails instantly, before the model does any work, with:
Error: NonRetriableError: Provider Error We're having trouble connecting to the model provider. This might be temporary - please try again in a moment.
The message is misleading — nothing is wrong with connectivity, and retrying never helps. The cause is the workflows plugin's tool schemas: bb_workflow_run.args and bb_workflow_result.value are declared with zod 4's z.json(), which compiles to a self-referential $defs entry:
"args": { "$ref": "#/$defs/__schema0" },
"$defs": {
"__schema0": {
"anyOf": [
{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" },
{ "type": "array", "items": { "$ref": "#/$defs/__schema0" } },
{ "type": "object", "additionalProperties": { "$ref": "#/$defs/__schema0" } }
]
}
}Grok 4.6 rejects a tool list containing that recursive $ref. Grok 4.5 accepts it, which is why this only shows up on 4.6.
Reproduction
On bb 0.37.0 with cursor-agent 2026.08.11-e8db854:
bb thread spawn --provider acp-cursor --model cursor-grok-4.6-medium --prompt "Reply with exactly: PONG"
# -> NonRetriableError: Provider Error ...
bb plugin disable workflows
bb thread spawn --provider acp-cursor --model cursor-grok-4.6-medium --prompt "Reply with exactly: PONG"
# -> PONGIsolation
Each row is a fresh session; the failure tracks the schema, not the model or the transport.
| Setup | Result |
|---|---|
| Grok 4.6 in bb, any reasoning level | Provider Error |
| Grok 4.6 in bb, workflows plugin disabled | works |
| Grok 4.5 in bb | works |
Grok 4.6 via cursor-agent -p |
works |
Grok 4.6 over raw ACP, mcpServers: [] |
works |
Grok 4.6 over raw ACP + one MCP tool carrying the z.json() schema |
Provider Error |
Same, with propertyNames removed |
Provider Error |
| Same, but flat (non-recursive) schema | works |
| Grok 4.5 + the recursive schema | works |
So the trigger is specifically the recursive $ref; propertyNames is incidental.
Fix
PR to follow replaces z.json() in the two workflow tool parameters with a flat unknown wire schema, narrowed to JsonValue at each call site so the existing JSON-compatibility validation is preserved, plus a harness test that fails if any workflow tool schema regains a $ref or $defs.
Possible follow-up
That fixes the two shipped tools, but nothing stops a plugin — including third-party marketplace plugins — from registering another recursive schema and breaking the same providers. apps/server/src/services/plugins/plugin-api.ts converts every plugin tool with z.toJSONSchema(parameters, { io: "input" }); rejecting or flattening recursive $refs at that boundary would make the guarantee general. Worth deciding separately, since it changes what every provider sees.
AGENT GENERATED: by Claude Opus 5
Activity
SawyerHood commentedon Aug 14, 2026
This is a great catch! I'm trying to figure out how to handle this generically since this arguably makes the tool worse for other models.
I wonder if we could conditionally do this for grok or ideally we have some way to parse out the error and make it more clear to the user that you need to disable this tool or auto disable it
Keep workflow tool schemas free of recursive $refs (#1613)
SawyerHood commentedon Aug 18, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1612.html
const entryPoint = fileURLToPath(import.meta.url)instead of process.argv[1] (patch + failing-on-main test in /tmp/bb-reports/issues/1612/repro/); extend bridge.test.ts to actually run mcpServers[0].command/args and call tools/list. Re-verified live: with the patch a<host.js> --mcp-stdioprocess appears and Grok lists mcp_bb-bridge_bb_workflow_run + update_environment_directory. 2) Recursive schemas: Keep workflow tool schemas free of recursive $refs #1613 merged — keep z.unknown() for the two…The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at
16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).SawyerHood commentedon Aug 18, 2026
Closing as not reproducible after #1613. We could not trigger the recursive-$ref rejection with the same cursor-agent build (2026.08.11-e8db854) across raw ACP sessions and several bb threads with the workflows plugin enabled, and #1613 has since merged the defensive change (
z.unknown()for the two workflow tools). Details: https://get-bb.github.io/reports/issues/1612.htmlIf it happens again, please reopen with the thread id and the exact provider error text and we will pick it back up.
Fix Cursor always selecting fast mode (#1691)