Cursor-sdk v0.1.6 - Windows: os.get_blocking/os.set_blocking not available + sandboxing unsuspported

Describe the Bug

Title: cursor-sdk v0.1.6 — three Windows compatibility issues (with workarounds)

Package: cursor-sdk v0.1.6 (PyPI, May 29 2026)
Environment: Windows 10, Python 3.11.9

Ran into a few issues getting the SDK working on Windows. All fixable with small workarounds — sharing in case it helps others:

1. os.get_blocking() doesn't exist on Windows
2. os.set_blocking() doesn't exist on Windows

Both were added in Python 3.12 and are Unix-only. Monkey-patching before import works:
python
import os
if not hasattr(os, "get_blocking"):
    os.get_blocking = lambda fd: True
if not hasattr(os, "set_blocking"):
    os.set_blocking = lambda fd, blocking: None


3. SandboxOptions(enabled=True) raises "sandboxing is not supported in this environment"

Workaround: omit sandbox_options entirely and just pass local=LocalAgentOptions(cwd=...).

After those three fixes, the SDK works great on Windows. Thanks for shipping this , excited to use it programmatically.

Steps to Reproduce

  1. Windows 10, Python 3.11+
    2. pip install cursor-sdk
    3. Set CURSOR_API_KEY
    4. Run:
    from cursor_sdk import Agent, AgentOptions, LocalAgentOptions, SandboxOptions
    Agent.prompt(“hello”, options=AgentOptions(
    model=“composer-2.5”,
    local=LocalAgentOptions(
    cwd=“.”,
    sandbox_options=SandboxOptions(enabled=True)
    )
    ))
    5. Observe AttributeError or sandbox error

Expected Behavior

The SDK works on Windows without requiring monkey-patches of Unix-only os functions,
and handles missing sandbox support gracefully (either auto-disabling it or
documenting it as Unix-only).

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

N/A Using the Python SDK directly (cursor-sdk v0.1.6 via pip)

For AI issues: which model did you use?

composr-2.5

For AI issues: add Request ID with privacy disabled

N/A SDK only, not through IDE or CLI

Additional Information

  • Use case: We’re integrating the SDK into a headless agent dispatch system (Odysseus Agent Hub), so programmatic Windows support matters for CI/automation use cases.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report and the ready-to-use workarounds. It really helps.

Point by point:

1 and 2 os.get_blocking / os.set_blocking
This is a bug on our side. These functions were added only in Python 3.12 and are Unix-only, so on Windows with Python 3.11 they throw AttributeError. I’ve filed an internal report, but I can’t share an ETA yet. Your pre-import monkey patch is a solid workaround until we fix it:

import os
if not hasattr(os, "get_blocking"):
    os.get_blocking = lambda fd: True
if not hasattr(os, "set_blocking"):
    os.set_blocking = lambda fd, blocking: None

3 SandboxOptions(enabled=True)
This error is expected. Sandbox isn’t implemented on Windows yet, it’s only available on macOS and Linux, so the message is correct. Your approach to just skip sandbox_options and use LocalAgentOptions(cwd=...) is the right one on Windows.

Once we fix 1 and 2, I’ll reply in the thread. Let me know if the workaround doesn’t work anywhere.