Where does the bug appear (feature/product)?
Cursor SDK
Describe the Bug
@cursor/sdk (1.0.28) local agent on Vercel serverless logs:
[TranscriptStore] Failed to write transcript: Error: ENOENT: no such file or directory, mkdir ‘/home/sbx_user1051’
We pass local.store: JsonlLocalAgentStore under mkdtemp in /tmp and a sealed cwd per the TypeScript SDK docs. Kernel runs still complete and return tool outcomes, but TranscriptStore appears to write under $HOME, which does not exist in the Vercel sandbox.
Steps to Reproduce
- Deploy a SvelteKit (Node) API route on Vercel Preview that runs one @cursor/sdk local agent per POST.
- Agent.create with model composer-2.5, tools: [‘mcp’], disallowedTools: [‘task’].
- local.cwd = mkdtemp under os.tmpdir(); local.store = new JsonlLocalAgentStore(path.join(cwd, ‘store’)); settingSources: .
- agent.send(utterance) → run.wait() → dispose agent; rm cwd in finally.
- Call the route from a client (e.g. mobile browser on Preview URL).
- Check Vercel function logs for the TranscriptStore ENOENT line.
Expected Behavior
No filesystem errors in logs. Transcript persistence (if any) should use the configured local.store path under /tmp, or skip transcript writes on serverless when $HOME is not writable. Kernel behavior should be unchanged.
Operating System
Linux
Version Information
@cursor/sdk: 1.0.28
Host: Vercel serverless Node (Preview, develop branch)
App: SvelteKit 2 + @sveltejs/adapter-vercel
Node (project engines): >=24.0.0
Not using Cursor IDE for this path; server-side SDK only.
For AI issues: which model did you use?
composer-2.5 (via Agent.create model: { id: ‘composer-2.5’ })
For AI issues: add Request ID with privacy disabled
N/A — server-side @cursor/sdk in our own API route, not the Cursor IDE chat. We did not capture a requestId from the SDK run result. Can provide Vercel deployment ID / function invocation timestamp if needed.
Additional Information
Docs followed: Cursor TypeScript SDK | Cursor Documentation (JsonlLocalAgentStore for environments where default SQLite store path is unavailable).
Relevant Agent.create shape:
- local.cwd: sealed temp dir under os.tmpdir()
- local.store: JsonlLocalAgentStore(/store)
- local.settingSources:
- local.customTools: allowlisted tools only
Error path: mkdir ‘/home/sbx_user1051’ — looks like sandbox $HOME on Vercel, not our store path.
Impact: noisy logs every kernel request; product still works (refuse/clarify/draft/render). Unsure if transcript data is lost.
Planned workaround: HOME=/tmp on Vercel env (not tested yet).
Repo is private; happy to share a minimal repro snippet if useful.
Does this stop you from using Cursor
No - Cursor works, but with this issue