Where does the bug appear (feature/product)?
Somewhere else…
Describe the Bug
Every cloud-agent run launched via @cursor/sdk (Agent.create({ cloud: ... })) returns terminal status ERROR in 5-76 seconds, regardless of repo, model, or environment config. Drilling into the agent UI surfaces:
Shell tool is currently failing with “Workflow execution failed” — file/search tools work, but I can’t spawn any shell commands.
Error: Command failed to spawn: Workflow execution failed
So Read/Glob/Grep work; every Shell invocation (even echo hello) fails. The agent retries internally a few times, then gives up and reports “unexpected error repeatedly.”
Steps to Reproduce
import { Agent } from '@cursor/sdk'; // 1.0.12
const agent = await Agent.create({
apiKey: process.env.CURSOR_API_KEY,
model: { id: 'claude-opus-4-7' }, // also fails on composer-2, gpt-5.5
cloud: {
repos: [{ url: 'https://github.com/<org>/<repo>.git', startingRef: 'main' }],
autoCreatePR: true,
},
});
const run = await agent.send('add a comment to file X. Open a PR.');
await run.wait();
// SDK returns { status: 'completed' }, but /v0/agents/<id> shows status: 'ERROR'
Expected Behavior
Agent runs returns properly
What works (control)
- Dashboard-launched agents (cursor.com → “Start new agent”) on read-only prompts succeed.
- The per-repo “Development environment setup” agent (which Cursor itself runs when you click Configure) also succeeds — runs ~11 minutes, executes pnpm install, runs the test suite, saves a snapshot.
So the cloud VM exec works fine for those entry points. SDK-launched cloud agents are the broken path.
Status mismatch in the API
For the same agent ID:
- GET /v0/agents/ → “status”: “ERROR”
- GET /v1/agents/ → “status”: “ACTIVE”
- SDK’s run.wait() → resolves with { status: ‘completed’ } (Shell-tool errors swallowed)
This made it very expensive to diagnose — the SDK reports success while the agent has actually errored.
Failed agent IDs from today (all on one account)
bc-cdf2b7cc-32b0-404c-9672-65af79871367
bc-c7d76fef-95f1-451c-82a0-0f3e9f7a41cc
bc-65b9f94d-0dbd-44f3-bda2-5d469e8c520e
bc-354b4286-57c6-44f5-9962-162c5efd9cc4
Operating System
MacOS
Version Information
Version: 3.2.21
VSCode Version: 1.105.1
Commit: 806df57ed3b6f1ee0175140d38039a38574ec720
Date: 2026-05-03T01:46:14.413Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0
For AI issues: which model did you use?
all models
For AI issues: add Request ID with privacy disabled
Failed agent IDs from today (all on one account)
bc-cdf2b7cc-32b0-404c-9672-65af79871367
bc-c7d76fef-95f1-451c-82a0-0f3e9f7a41cc
bc-65b9f94d-0dbd-44f3-bda2-5d469e8c520e
bc-354b4286-57c6-44f5-9962-162c5efd9cc4
Additional Information
Diagnostic matrix (today, all on the same account)
┌─────────────────────────────────────────────────────────┬─────────────────────────────┬────────┬─────────────────┐
│ Repo state │ Repo │ Result │ Duration │
├─────────────────────────────────────────────────────────┼─────────────────────────────┼────────┼─────────────────┤
│ Configured snapshot │ / (configured) │ ERROR │ 18s │
├─────────────────────────────────────────────────────────┼─────────────────────────────┼────────┼─────────────────┤
│ Unconfigured (no .cursor/environment.json, no snapshot) │ / │ ERROR │ 76s (bootstrap) │
├─────────────────────────────────────────────────────────┼─────────────────────────────┼────────┼─────────────────┤
│ Just-cleaned (env file removed mid-test) │ / again │ ERROR │ 5s │
└─────────────────────────────────────────────────────────┴─────────────────────────────┴────────┴─────────────────┘
- Is this a known transient with your VM exec daemon, or specific to my account?
- Why does the SDK swallow Shell-tool errors as completed instead of surfacing them as failed? Surfacing the real error in the SDK return value would have saved a day of diagnosis.
- Is there a status feed I can poll to know when the SDK runtime recovers?
Happy to provide more agent IDs / SDK call traces if useful.
Does this stop you from using Cursor
No - Cursor works, but with this issue