Where does the bug appear (feature/product)?
Cursor SDK
Describe the Bug
@cursor/[email protected] local Agent runs fail under pnpm because @connectrpc/connect-node is imported at runtime but is not installed as a runtime dependency of @cursor/sdk.
Steps to Reproduce
- Create a pnpm project that depends on
@cursor/[email protected]. - Run a local Agent and call
agent.send(). - The run fails with:
Cannot find package @connectrpc/connect-node imported from .../node_modules/@cursor/sdk/dist/esm/index.js
- Adding the latest
@connectrpc/[email protected]is not a clean workaround, because it pulls@connectrpc/[email protected]and then fails against@bufbuild/[email protected]with a codegenv2 export error. - Adding
@connectrpc/[email protected]works around the issue.
Expected Behavior
@cursor/sdk should declare @connectrpc/connect-node as a runtime dependency or optional dependency when it is imported at runtime, so local Agent runs work in strict package-manager environments such as pnpm without consumers adding undeclared transitive dependencies manually.
Operating System
Windows 10/11
Version Information
@cursor/sdk: 1.0.19
Package manager: pnpm
Node.js: 24.17.0
Runtime: local Agent
For AI issues: which model did you use?
N/A - this fails before model behavior is relevant.
For AI issues: add Request ID with privacy disabled
N/A - the failure occurs locally during agent.send() dependency loading.
Additional Information
Workaround: pnpm add @connectrpc/[email protected]
This looks like a package dependency declaration issue rather than an application-level peer dependency requirement.
Does this stop you from using Cursor
No - Cursor works, but with this issue