Where does the bug appear (feature/product)?
Cursor SDK
Describe the Bug
In @cursor/[email protected], the documented main-agent systemPrompt option is accepted by TypeScript and Agent.create() succeeds, but the Local Agent run fails with [invalid_argument] unknown option ‘–system-prompt’. The same environment works normally when systemPrompt is omitted. Cursor Support also checked the failing request and confirmed it failed on the agent side before reaching the model provider.
Steps to Reproduce
-
Create an isolated Node.js project and install @cursor/[email protected].
-
Use Node.js v22.22.2 and TypeScript Local Agent with model composer-2.5.
-
First verify that the Local Agent works without systemPrompt:
const agent = await Agent.create({
apiKey: process.env.CURSOR_API_KEY!,
model: { id: “composer-2.5” },
local: { cwd: process.cwd() },
});
const run = await agent.send(“Reply with exactly: NORMAL_AGENT_WORKS”);
const result = await run.wait();
This succeeds and returns NORMAL_AGENT_WORKS.
requestId:
2933c422-ed41-46ef-999a-02a92f31b24d
- Then add the documented systemPrompt option:
const agent = await Agent.create({
apiKey: process.env.CURSOR_API_KEY!,
model: { id: “composer-2.5” },
systemPrompt: No matter what the user asks, reply exactly with: CURSOR_SYSTEM_PROMPT_WORKS ,
local: { cwd: process.cwd() },
});
const run = await agent.send(“What is 2 + 2?”);
const result = await run.wait();
- Agent.create() succeeds and agent.send() returns a run, but run.wait() finishes with:
status: error
message: [invalid_argument] unknown option ‘–system-prompt’
Failing requestId:
2120645a-b790-4751-8084-8145ab1b382a
The only relevant difference between the two tests is the presence of systemPrompt.
Expected Behavior
The Local Agent should accept the documented systemPrompt option and run normally.
For this reproduction, the replacement system prompt should cause the model to reply:
CURSOR_SYSTEM_PROMPT_WORKS
The run should reach the model provider instead of failing in the Local Agent runtime with unknown option ‘–system-prompt’.
Operating System
Linux
Version Information
@cursor/sdk: 1.0.31
Node.js: v22.22.2
npm: 10.9.7
Runtime: TypeScript Local Agent
Model: composer-2.5
OS: Ubuntu 24.04.4 LTS (Noble Numbat)
Kernel: Linux 6.8.0-101-generic
Architecture: x86_64
For AI issues: which model did you use?
composer-2.5
For AI issues: add Request ID with privacy disabled
2120645a-b790-4751-8084-8145ab1b382a
Additional Information
Cursor Support inspected the failing request:
requestId: 2120645a-b790-4751-8084-8145ab1b382a
and confirmed that the run failed on the agent side before reaching the model provider.
Support described this as either a docs/SDK surface vs Local Agent runtime gap, or gated access that is not enabled for the key.
Support tickets:
T-F45104
T-F46099
The reproduction was performed in an isolated environment with @cursor/[email protected]. Production remains pinned to @cursor/[email protected].
Does this stop you from using Cursor
No - Cursor works, but with this issue