Problem / Observed Behavior
When using a Cursor-backed model with Pi tools enabled (e.g. cursor/cursor-grok-4.6-high), prompt requests requiring web access can trigger a server-side interactionQuery (field 9: webFetchRequestQuery).
In the current provider implementation, receiving any interactionQuery immediately throws an error:
// extensions/ai-providers/cursor/provider.ts:993-996
if (message.message.case === "interactionQuery") {
throw new Error(
`Cursor interaction query ${message.message.value.query.case ?? "unknown"} is unavailable ${context.tools?.length ? "outside Pi's interaction lifecycle" : "in chat-only mode"}`,
);
}
This immediately aborts the active AgentService/Run turn with stopReason: "error", leaving the model no opportunity to recover, use alternative Pi tools, or explain the limitation to the user.
Environment
- Pi:
0.85.1
- OpenPI:
npm:@tt-a1i/openpi@0.8.1
- Verified: installed
extensions/ai-providers/cursor/{provider.ts,proto.ts,tool-bridge.ts} match upstream openpi@0d17f4577fe31315fe6c95370d251bdb4e2413cf byte-for-byte.
- Provider & Model:
cursor / cursor-grok-4.6-high
Repro Steps
In a clean session with only Pi's built-in read tool enabled (no bash, no web-fetch skill/tools):
pi --provider cursor --model cursor-grok-4.6-high \
--tools read \
--no-skills --no-prompt-templates --no-context-files \
"请实际访问 https://example.com/ 并返回网页标题,不允许根据记忆回答"
(Note: The reproduction explicitly enables only the read tool, deliberately excluding web fetchers and bash to verify the failure path when native web fetch is attempted.)
Actual Error
Error: Cursor interaction query webFetchRequestQuery is unavailable outside Pi's interaction lifecycle
The CLI turn ends with assistant status error.
Relationship to #234 and #484
Expected Behavior & Invariants
- Pi-native ownership remains non-negotiable:
Cursor-managed cloud fetching must not be approved. Sending an approved response would allow Cursor servers to fetch external URLs in the cloud, bypassing Pi's permission lifecycle, network controls, and audit trails.
- Turn continuation:
Rather than hard-throwing and crashing the entire turn, the provider should ideally signal protocol-level rejection so the model retains the turn to either adapt or explain the limitation gracefully.
- Proposed exploration & boundaries:
- Define
interactionResponse (field 6) and WebFetchRequestResponse.rejected in proto.ts to respond in band.
- Enforce a bounded rejection limit (similar to
MAX_NATIVE_EXEC_REJECTIONS) against repeated query loops.
- Non-goal / Explicit unknown: In-band rejection is a candidate mitigation to prevent hard crashes. Because model behavior following rejection is subject to Cursor server-side logic, we do not promise or assume that the model will automatically fall back to advertised Pi MCP tools.
Problem / Observed Behavior
When using a Cursor-backed model with Pi tools enabled (e.g.
cursor/cursor-grok-4.6-high), prompt requests requiring web access can trigger a server-sideinteractionQuery(field 9:webFetchRequestQuery).In the current provider implementation, receiving any
interactionQueryimmediately throws an error:This immediately aborts the active
AgentService/Runturn withstopReason: "error", leaving the model no opportunity to recover, use alternative Pi tools, or explain the limitation to the user.Environment
0.85.1npm:@tt-a1i/openpi@0.8.1extensions/ai-providers/cursor/{provider.ts,proto.ts,tool-bridge.ts}match upstreamopenpi@0d17f4577fe31315fe6c95370d251bdb4e2413cfbyte-for-byte.cursor / cursor-grok-4.6-highRepro Steps
In a clean session with only Pi's built-in
readtool enabled (nobash, no web-fetch skill/tools):(Note: The reproduction explicitly enables only the
readtool, deliberately excluding web fetchers and bash to verify the failure path when native web fetch is attempted.)Actual Error
The CLI turn ends with assistant status
error.Relationship to #234 and #484
e4c2bf4e32b4) resolved the earlier preview errorError: Cursor-native tools are unavailable; use the advertised Pi MCP toolsby ignoring non-authoritativeInteractionUpdatepreviews, and added bounded in-band UNIMPLEMENTED rejection for native exec requests (ExecServerMessage, up to 3 times).interactionQuery.extensions/ai-providers/cursor/proto.tscurrently lacksAgentClientMessage.interactionResponse(field 6), leaving directthrowas the only coded path upon receivinginteractionQuery.Expected Behavior & Invariants
Cursor-managed cloud fetching must not be approved. Sending an
approvedresponse would allow Cursor servers to fetch external URLs in the cloud, bypassing Pi's permission lifecycle, network controls, and audit trails.Rather than hard-throwing and crashing the entire turn, the provider should ideally signal protocol-level rejection so the model retains the turn to either adapt or explain the limitation gracefully.
interactionResponse(field 6) andWebFetchRequestResponse.rejectedinproto.tsto respond in band.MAX_NATIVE_EXEC_REJECTIONS) against repeated query loops.