Cursor SDK 1.5: live shell output, step counts and steadier local agents
With Cursor SDK 1.5.0, run streams emit a shell-tool-call-delta interaction update with each chunk of a shell command's stdout or stderr, so you can show live output instead of waiting for the command to finish. It works for local and cloud runs, in TypeScript and Python. On local runs, onDelta sends one step-started and one step-completed update for each model call, and step-completed carries the step's duration. When a run is cancelled or fails mid-turn, usage now counts the model calls that already completed instead of coming back empty. Cursor says that count is a lower bound for a cut-off turn. Local agents accept a local.onConnectionStateChange callback that reports reconnecting and connected, can use a sandbox helper you choose, follow your commit and PR attribution settings, and fail with InlineMcpServersBlockedError when your team's MCP policy blocks a server you passed in. Existing sign-ins for servers passed in mcpServers are cleared, so they ask you to sign in again. Python local agents can stream over HTTP/1.1 for proxies that break HTTP/2. Fixes cover Cursor-hosted MCP servers in API-key local runs, checkpoints, the shell working directory, Grep results and saved login credentials.
Soft Pyramid is not affiliated with, endorsed by, or a partner of Cursor. These guides are Soft Pyramid's own notes on Cursor features.
How to use it
- Upgrade @cursor/sdk (npm) or cursor-sdk (PyPI) to 1.5.0.
- If you switch exhaustively over interaction updates, handle the new ShellToolCallDeltaUpdate type to show live shell output.
- For local agents, pass a local.onConnectionStateChange callback to see reconnecting and connected states while the SDK retries a dropped connection.
- In Python behind a proxy that breaks HTTP/2 streams, call Cursor.configure(local={"use_http1_for_agent": True}) before launching local agents, or set CURSOR_SDK_USE_HTTP1_FOR_AGENT=true.
