# @cursor/sdk 1.0.35 + Grok 4.6 high: isolated no-tool runs drop or die with \[internal\] unable to open database file (2026-10-02)

**URL:** <https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594>\
**Category:** Bug Reports\
**Tags:** cursor-sdk\
**Created:** [October 2, 2026, 12:04pm UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594 "2026-10-02T12:04:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mad4thrash](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@mad4thrash](https://forum.cursor.com/u/mad4thrash)\
**Post date:** [October 2, 2026, 12:04pm UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/1 "2026-10-02T12:04:31Z")

</div>

### Where does the bug appear (feature/product)?

Cursor SDK

### Describe the Bug

Where does the bug appear: Cursor SDK (@cursor/sdk), not the IDE chat.

On 2026-10-02, local Agent.create → send → wait() runs with Grok 4.6, effort: high, fast: false fail in two ways while [status.cursor.com](http://status.cursor.com) is All Systems Operational and the IDE chat on the same account works.

Linux VPS (Node 22, sequential isolated agents, tools: , empty temp cwd, new agent per call):  
Agent turn stopped after repeated resume attempts made no progress  
Connection failed repeatedly  
Same adapter, same model, previous day (2026-10-01) finished a 19-call batch around 08:41. Bumping @cursor/sdk 1.0.30 → 1.0.35 did not stop the drops.

Windows, same adapter, one-line prompt {“ok”:true}: sandbox fallback, then fail after 145s with  
Cursor non ha risposto: [internal] unable to open database file.  
run.cancel() after 8s does resolve wait() with status: cancelled.

Expected: a no-tool isolated agent returns text (or a structured error with run.id) in the usual couple of minutes, including for a one-line JSON prompt. Status green / IDE chat healthy should not hide a broken SDK stream.

This is not a huge-payload / long-lived conversation case: each run is a fresh agent, no tools, tiny prompt. Happy to add agent.agentId / run.id from the next failure.

### Steps to Reproduce

1. Node 22, `@cursor/sdk` 1.0.35 (also seen on 1.0.30). CURSOR\_API\_KEY of a Pro account that can select Grok 4.6.
2. Run this as a one-shot. Fresh agent, empty temp cwd, tools: , Grok 4.6, effort high, fast false:

```ts
import { mkdtemp } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { Agent, Cursor } from "@cursor/sdk";
const apiKey = process.env.CURSOR_API_KEY!;
const models = await Cursor.models.list({ apiKey });
const grok = models.find((m) => /grok-4\.6/i.test(m.id) || /grok-4\.6/i.test(m.name ?? ""));
if (!grok) throw new Error("grok-4.6 not in catalog");
const cwd = await mkdtemp(join(tmpdir(), "probe-"));
const agent = await Agent.create({
  apiKey,
  model: {
    id: grok.id,
    params: [
      { id: "effort", value: "high" },
      { id: "fast", value: "false" },
    ],
  },
  mode: "agent",
  tools: [],
  local: { cwd, settingSources: [], sandboxOptions: { enabled: false } },
});
const run = await agent.send('Reply with JSON only: {"ok":true}');
const result = await run.wait();
console.log(result.status, result.error, result.result);
await agent[Symbol.asyncDispose]();

Windows: after the usual sandbox-not-supported fallback (if you leave sandbox on), wait() fails after ~145s with [internal] unable to open database file. A one-line JSON prompt should not take that long or die on SQLite.

Linux VPS, same options, new agent per call, sequential: wait() ends with Agent turn stopped after repeated resume attempts made no progress or Connection failed repeatedly. Same machine + adapter on 2026-10-01 finished a 19-call batch around 08:41. Status.cursor.com was green; IDE chat on the same account worked.

Bumping @cursor/sdk 1.0.30 → 1.0.35 did not stop the Linux drops.

### Operating System
Linux

### Version Information
cursor sdk 1.0.35

### Does this stop you from using Cursor
No - Cursor works, but with this issue
```

---

<div class="post-metadata">

**Author:** ![mad4thrash](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@mad4thrash](https://forum.cursor.com/u/mad4thrash)\
**Post date:** [October 2, 2026, 12:30pm UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/5 "2026-10-02T12:30:05Z")

</div>

Local Windows repro just now (2026-10-02 12:26:55 send, 12:29:12 error, ~137s):

agentId: agent-acea4caa-1981-4805-992f-a3551f08bbd8

runId: run-be986a44-47f2-4991-af5d-259720a334ec

requestId: bb5b52f9-4b23-4a87-992a-15d25381f54f

status: error

error: [internal] unable to open database file

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [October 2, 2026, 5:23pm UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/7 "2026-10-02T17:23:03Z")

</div>

Hey @mad4thrash, thanks for the report and the repro script.

From what we can see, the model side of these runs finishes normally. The failure happens when the SDK saves the run’s progress into its local SQLite store on your machine (under `~/.cursor/projects/.../sdk-agent-store`). `unable to open database file` is SQLite on your side refusing to open that file, so the run can’t save a checkpoint, retries the same turn, and eventually stops with the “resume attempts made no progress” or “Connection failed repeatedly” errors.

Could you try the file-based store instead, with a short path? Run this once before `Agent.create`:

```ts
import { Cursor, JsonlLocalAgentStore } from "@cursor/sdk";
Cursor.configure({ local: { store: new JsonlLocalAgentStore("/var/tmp/cursor-sdk-store") } });

```

On Windows, use something short like `C:\cursor-sdk-store`. The default store path includes your temp folder name plus two long hashes, and on Windows it can run into the 260 character path limit.

If it still fails, please send:

1. `agent.agentId` and `run.id` from a failed run
2. On the VPS, the output of `df -h ~`, `df -i ~`, `ulimit -n` and `ls ~/.cursor/projects | wc -l` (each new temp cwd creates a new folder there)
3. Whether your adapter sets its own timeout or AbortSignal around `send()` / `wait()`, since some runs are being closed from the client side after 45 seconds to 2 minutes

---

<div class="post-metadata">

**Author:** ![mad4thrash](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@mad4thrash](https://forum.cursor.com/u/mad4thrash)\
**Post date:** [October 3, 2026, 4:37pm UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/9 "2026-10-03T16:37:47Z")

</div>

Hey, thanks for the diagnosis.

It matches what I saw on Windows. Same adapter, one-line `{"ok":true}`, Grok 4.6 high, Fast off, `tools: []`. On the default SQLite store the first `thinking-delta` arrived at about 4s, then the same turn repeated at 3.5s, 37s, 71s and 110s, and `wait()` ended at 141s with `status=error` and `[internal] unable to open database file`. With `JsonlLocalAgentStore` it was one turn and `finished` with `{"ok":true}` in about 4.6s. That failed Windows run was `agentId` `agent-acea4caa-1981-4805-992f-a3551f08bbd8`, `runId` `run-be986a44-47f2-4991-af5d-259720a334ec`, `requestId` `bb5b52f9-4b23-4a87-992a-15d25381f54f`.

The VPS is Linux, so the 260-character path limit is not that machine. Yesterday there I mostly saw `Agent turn stopped after repeated resume attempts made no progress` and `Connection failed repeatedly`, almost never the SQLite string. Today the same host finished about 60 isolated agent calls in 2.5–3 hours, roughly 2.5–3 minutes each, which is the healthy rate.

On the VPS, `df -h ~` is `/dev/sda1` 96G, 23G used, 73G free, 24%. `df -i ~` is 12,976,128 inodes, 561,210 used, 5%. `ulimit -n` is 60000. `ls ~/.cursor/projects | wc -l` is 49. Disk, inodes and the fd limit look fine; 49 project folders is not a pile-up.

Yes, the adapter closes runs from the client. There is no `AbortSignal` on `send()`. I call `run.cancel()` myself: 10 minutes on `wait()` as a backstop, 2 minutes with no `thinking` / `thinking-delta` then a new agent, and 5 seconds after `turn-ended` then `cancel()` and I keep the streamed text if I already have it. The 45s–2min closes you are seeing are those client timers, not the model hanging up. The 5s-after-turn one in particular aborts a `wait()` that may still be retrying the local checkpoint.

I will surely try `Cursor.configure({ local: { store: new JsonlLocalAgentStore(...) } })` if SQLite fails again.

---

<div class="post-metadata">

**Author:** ![Fabio\_Paul\_Bedoya\_Hu](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/fabio_paul_bedoya_hu/32/123639_2.png) [@Fabio\_Paul\_Bedoya\_Hu](https://forum.cursor.com/u/Fabio_Paul_Bedoya_Hu)\
**Post date:** [October 15, 2026, 10:13pm UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/11 "2026-10-15T22:13:48Z")

</div>

I independently reproduced the Windows default SQLite-store failure with `@cursor/sdk` 1.0.35 in T3 Code Nightly (Windows 11 Pro, x64). This also matches [[Bug]: Cursor SDK retries replay a finished turn (re-running tool calls) when its checkpoint save fails · Issue #19112 · pingdotgg/t3code · GitHub](https://github.com/pingdotgg/t3code/issues/19112).

A possible SDK fix is to normalize the default state root with Node’s `path.toNamespacedPath` before passing descendant paths to SQLite. That retains the existing store directory and agent identifiers instead of switching persistence formats or moving histories.

Measured on the same Windows host:

| Database path | Result using `node:sqlite` |
| --- | --- |
| Ordinary absolute path, 304 characters | `unable to open database file` |
| Same path with Windows extended-length prefix, 308 characters | Create, insert and read succeeded |
| Short-path control, 77 characters | Create, insert and read succeeded |

Enabling Windows `LongPathsEnabled` alone did not fix the normal-path failure. The setting was restored afterward.

Proposed change at the SDK’s default-root boundary (illustrative, not a replacement for your source implementation):

```ts
import { join, toNamespacedPath } from "node:path";

const stateRoot = toNamespacedPath(join(projectDir, "sdk-agent-store"));

```

In the published 1.0.35 CommonJS build, the default-root logic is bundled into both `index.js` and `sqlite.js`; both copies need equivalent normalization, along with any corresponding ESM exports. Hash inputs, directory selection, existing-store discovery and migration behavior should remain unchanged. `toNamespacedPath` leaves non-Windows paths unchanged.

After applying equivalent normalization locally to both CJS exports, a real native Cursor run through T3 finished successfully: shell, file edit and readback all completed; SDK status was `finished` after 38.174 seconds; T3 persisted `completed`, cleared the active run and displayed the final reply. `enableAgentRetries` remained enabled. This was the native SDK integration, without a CLI fallback or a custom store.

The host also required T3’s separate Windows sandbox policy correction (submitted separately as [https://github.com/pingdotgg/t3code/pull/20046](https://github.com/pingdotgg/t3code/pull/20046)) before reaching this checkpoint failure; that adapter defect and the SQLite path defect are separate.

Could the SDK normalize its default SQLite state root upstream and add Windows regression coverage for long paths, WAL/sidecar paths, existing stores and all published entry points? The Linux failures discussed above may have a different cause; these observations cover Windows only.

A standalone probe for Windows (Node \>=22), including WAL sidecars:

```js
// Run with Node >=22 on Windows. Creates and removes its own temporary directory.
const fs = require('node:fs');
const os = require('node:os');
const path = require('node:path');
const { DatabaseSync } = require('node:sqlite');
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'sqlite-path-repro-'));
try {
  const dir = path.join(root, 'a'.repeat(150), 'b'.repeat(130));
  fs.mkdirSync(dir, { recursive: true });
  for (const [label, filename] of [
    ['short control', path.join(root, 'short.db')],
    ['ordinary long path', path.join(dir, 'long.db')],
    ['namespaced same path', path.toNamespacedPath(path.join(dir, 'long.db'))],
  ]) {
    let db;
    try {
      db = new DatabaseSync(filename);
      db.exec('PRAGMA journal_mode=WAL; CREATE TABLE IF NOT EXISTS proof(n INTEGER); INSERT INTO proof VALUES(1363)');
      const result = db.prepare('SELECT n FROM proof ORDER BY rowid DESC LIMIT 1').get();
      console.log(JSON.stringify({ label, length: filename.length, value: result.n }));
    } catch (error) {
      console.log(JSON.stringify({ label, length: filename.length, error: error.message }));
    } finally {
      db?.close();
    }
  }
} finally {
  fs.rmSync(root, { recursive: true, force: true });
}

```

Prepared with GPT-6 in Codex.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [October 16, 2026, 8:30am UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/16 "2026-10-16T08:30:41Z")

</div>

Hey @mad4thrash, thanks for testing the file-based store and sending the numbers. That lines up with what we expected on Windows.

@Fabio_Paul_Bedoya_Hu, thanks for the independent repro and the measurements. The long-path explanation matches what we see: the default store path can go past the Windows 260 character limit, and SQLite then refuses to open the file. I’ve passed your proposed change and the probe script to the team.

Until that’s addressed in the SDK, the reliable option on Windows is to set the store explicitly before Agent.create, with a short root folder:

```
import { Cursor, JsonlLocalAgentStore } from "@cursor/sdk";
Cursor.configure({ local: { store: new JsonlLocalAgentStore("C:\\cursor-sdk-store") } });

```

A short cwd also helps if you’d rather stay on the default store, since the project folder name is built from it.

On the VPS: since your adapter cancels 5 seconds after turn-ended, wait() can get cut off while the run is still saving its progress. That can make the SDK resume and repeat the same turn. If you can, let wait() resolve on its own after turn-ended (your 10 minute backstop is fine) and see whether the “resume attempts made no progress” errors stop.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [October 20, 2026, 9:37am UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/22 "2026-10-20T09:37:02Z")

</div>

Hey @mad4thrash,

A change has landed so that when the SDK can’t open its local SQLite store, the run keeps going in memory (with a warning) instead of replaying the same turn and ending with `[internal] unable to open database file`. It will be included in an upcoming version of `@cursor/sdk`.

The Windows path-length cause is being handled separately. Until that’s in, `JsonlLocalAgentStore` with a short root folder is still the best option if you want run history kept on disk.

Let me know if you still hit the error after updating.

cc @Fabio_Paul_Bedoya_Hu

---

<div class="post-metadata">

**Author:** ![mad4thrash](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@mad4thrash](https://forum.cursor.com/u/mad4thrash)\
**Post date:** [October 20, 2026, 9:51am UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/23 "2026-10-20T09:51:00Z")

</div>

ok, thank you!

---

<div class="post-metadata">

**Author:** ![TechyAditya](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/techyaditya/32/124874_2.png) [@TechyAditya](https://forum.cursor.com/u/TechyAditya)\
**Post date:** [October 29, 2026, 8:05pm UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/24 "2026-10-29T20:05:11Z")

</div>

Hi @Colin, thanks for the updates on this.

Is there an ETA for the Windows path-length fix? Could you also say which `@cursor/sdk` version includes the in-memory fallback from your Oct 20 post?

This still affects T3 Code on Windows. Its current nightly bundles `@cursor/sdk` 1.0.38, which still builds the store path as `~/.cursor/projects/<slug>/sdk-agent-store/<hash>/agents/agent-<hash>/store.db` with no `\\?\` prefix. T3 scratch and worktree folders have long names, so that path passes 260 characters. `store.db` is then never created, and finished turns replay with their tool calls. Users reported this on the Oct 27 and Oct 28 nightlies in pingdotgg/t3code#19112.

T3 Code has an open PR that applies the `\\?\` workaround on its side (pingdotgg/t3code#24859). A fix in the SDK would cover every app that embeds it, and existing stores would keep working.

A rough timeline would help us decide whether to keep patching the SDK locally or wait for a release.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [November 5, 2026, 9:59am UTC](https://forum.cursor.com/t/cursor-sdk-1-0-35-grok-4-6-high-isolated-no-tool-runs-drop-or-die-with-internal-unable-to-open-database-file-2026-10-02/173594/30 "2026-11-05T09:59:10Z")

</div>

Hi @TechyAditya, both changes are already released, so you can stop patching the SDK locally.

The in-memory fallback from my Oct 20 post shipped in `@cursor/sdk` 1.0.40. The Windows path-length fix shipped in 1.1.0: the SDK now opens its SQLite stores with the `\\?\` prefix whenever the path (or its `-journal` file) would go past the 260 character limit. The current release, 1.3.1, has both. 1.0.38, which your nightly bundles, has neither, which fits what your users are seeing.

Existing stores keep working. Shorter paths are opened exactly as before, and a path that already starts with `\\?\` is passed through unchanged, so your workaround won’t conflict while you switch over.

One thing to check when moving up from 1.0.38: since 1.2.0, streams can include a new `summary` message type, so code that throws on unknown message types should skip it instead.

@mad4thrash, the same goes for you: on 1.1.0 or later the default store works on Windows again, so the `JsonlLocalAgentStore` workaround is now optional.

cc @Fabio_Paul_Bedoya_Hu
