Skip to content

fix(cursor): ask_user works again with the out-of-process Cursor SDK - #78

Merged
nachogames merged 2 commits into
mainfrom
fix/cursor-ask-user-worker
Nov 23, 2026
Merged

nachogames merged 2 commits into
mainfrom
fix/cursor-ask-user-worker

Conversation

@nachogames

Copy link
Copy Markdown
Owner

Cursor's ask_user question tool failed on every call in 0.1.66 with i.execute is not a function. Upstream pingdotgg#39526 moved the Cursor SDK into a worker process, and send options now reach it as JSON, so the tool's execute function was dropped on the way. ask_user is Ctrl-only, so upstream's worker protocol had no way to call back into the server.

Fix

  • The worker gives each custom tool an execute that sends a customToolCall frame to the server and waits.
  • The server runs the real tool (the existing ask_user card logic) and replies with customToolResult.
  • Custom tools passed at open are refused with a clear error, so the same silent failure can't come back that way.
  • A tool call that arrives after its run ended now says the run ended.

Testing

  • New live subprocess test: a worker's tool call runs the server's tool and returns its answer, and an unknown tool returns an error. Without the fix it hangs until its 60-second timeout, which is how the bug shows in the app.
  • New unit test for the worker's call/settle bridge.
  • vp run check:changed: format, lint, knip and tests pass. Typecheck fails only in evals mcp-tool-use/run.ts, which this PR doesn't touch.
  • Not tested with a live Cursor turn (no Cursor sign-in on the build machine).

Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

nachogames and others added 2 commits November 23, 2026 16:20
Cursor now runs in a worker process, and send options reach it as JSON.
The ask_user tool's execute function was dropped on the way, so every
call failed with "i.execute is not a function".

The worker now gives each custom tool an execute that sends a
customToolCall frame to the server. The server runs the real tool and
replies with customToolResult.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Custom tools passed when opening a Cursor agent would reach the worker
without execute, the same silent failure as ask_user. The process
runner now refuses them with a clear error.

A tool call that arrives after its run has finished now says the run
ended instead of calling the tool unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nachogames
nachogames merged commit 05bf19d into main Nov 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant