[CLI/ACP] ACP sessions report their creation time as "last active" — updatedAt is the store.db mtime, which WAL mode never advances

,

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

ACP sessions report an updatedAt that never advances, so a session in daily
use displays — and sorts by — its creation date forever. In my case one
session showed a date 47 days stale while being actively used.

Two independent causes, both in ./src/acp/acp-storage.ts:

  1. The on-disk lister returns the mtime of store.db as updatedAt. The
    ACP store is SQLite in WAL mode, so ordinary use writes only
    store.db-wal and the main file’s mtime stays at creation.
  2. The in-memory path returns createdAt in the updatedAt field.

mergeSessionInfo keeps whichever is later, so both paths converge on the
creation time. Fixing only (1) will not fix this.

cursor-agent’s own chats store already does this correctly, in
./src/state/chat-session-list.ts.

Controlled experiment (new session, same day)

Created an ACP session, sent one message ~8 hours later.

                  at creation (12:46)    after a message (20:30)
store.db        4,096 B @ 12:40:55     4,096 B @ 12:40:55
store.db-wal  758,112 B @ 12:41:28   1,054,752 B @ 20:23:06
meta.json          64 B @ 12:42:43        64 B @ 20:22:02
 
reported updatedAt  2026-10-22T19:40:55.048Z   (identical both times)

store.db’s mtime did not move, although the message wrote 290 KB to the
WAL. The reported updatedAt equals that mtime to sub-second precision and
is already 7h42m stale on day one. It never advances again.

Note meta.json’s mtime did advance — relevant to fix option 2 below.

A second, older session reported 2026-09-04 on 2026-10-20 after 6
messages — 47 days stale, with 3.9 MB of uncheckpointed WAL.

Direct proof of the derivation: with both the client and cursor-agent
closed, I copied the WAL’s mtime onto store.db and changed nothing else.
The reported value followed it exactly, to 2026-10-20T18:59:24.272Z, and
the session sorted correctly again. One file’s timestamp changed and the
displayed date tracked it.

Steps to Reproduce

  1. Create a session over ACP (any ACP client).
  2. Note the mtime of ~/.cursor/acp-sessions/<id>/store.db.
  3. Send a message; check again.

Expected Behavior

Expected: updatedAt reflects the last message.
Actual: store.db mtime unchanged, WAL grown, updatedAt still the
creation time.

Operating System

Windows 10/11

Version Information

cursor-agent version: 2026.10.19-6bbf2c4 (also reproduced on 2026.09.28-64d2043)
OS: Windows Server 2019 x64
Surface: ACP (cursor-agent driven by an ACP client — any client; the
timestamp is computed inside cursor-agent, not by the client)

Additional Information

Cause

./src/acp/acp-storage.ts, the ACP session lister:

const o = await stat(s);           // s = <dir>/store.db
return { ..., updatedAt: o.mtime.toISOString() };

ACP’s meta.json has no timestamp to fall back on:

{"schemaVersion":1,"cwd":"c:\\work","title":"Test Session"}

Same file, the in-memory path: buildSessionInfoFromAgentStore returns
getMetadata("createdAt") in the updatedAt field.

I observed defect (2) directly: two session directories contain meta.json
and no store.db at all, yet still report a timestamp equal to their
creation time — stat() cannot be the source for those.

Not a regression. 2026.09.28-64d2043 reported the same frozen value a
day before 2026.10.19-6bbf2c4 was installed.

cursor-agent already implements this correctly

./src/state/chat-session-list.ts, same release:

const a = (i.updatedAtMs !== undefined && i.updatedAtMs > 0)
          ? i.updatedAtMs           // prefer the recorded value
          : Math.floor(o.mtimeMs);  // mtime only as a fallback

and the chats meta schema carries the field the ACP one omits:
{schemaVersion, createdAtMs, updatedAtMs, hasConversation, cwd}.

cursor-agent also already records real activity times for these same
sessions: ~/.cursor/ai-tracking/ai-code-tracking.db has 11
ai_code_hashes rows for the 47-day-stale conversation id, timestamped
2026-10-20 18:59:19Z — within 5 seconds of the WAL mtime, and 47 days from
what ACP reported for the same session.

Reproduction

  1. Create a session over ACP (any ACP client).
  2. Note the mtime of ~/.cursor/acp-sessions/<id>/store.db.
  3. Send a message; check again.

Expected: updatedAt reflects the last message.
Actual: store.db mtime unchanged, WAL grown, updatedAt still the
creation time.

Suggested fix

  1. Do what chat-session-list.ts does. Add updatedAtMs to the ACP
    meta.json schema, write it when the session is touched, and prefer it
    over the mtime. This fixes the in-memory path too, which can then return
    the same field instead of createdAt.
  2. If the schema cannot change, one line:
    max(mtime(store.db), mtime(store.db-wal), mtime(meta.json)).
    In the experiment above both the WAL and meta.json mtimes were correct
    while store.db was 7h42m stale.

Workaround for users

With cursor-agent and the ACP client closed:

$s = "$env:USERPROFILE\.cursor\acp-sessions\<id>\store.db"
(Get-Item $s).LastWriteTime = (Get-Item "$s-wal").LastWriteTime

Timestamp only, reversible, re-freezes after the next use.

Notes

Windows, one machine, two builds, one ACP client. Untested on macOS/Linux,
though the mechanism follows from SQLite WAL semantics plus an unconditional
stat() of the main file, so I’d expect it everywhere.

Code is quoted from the shipped bundles (9544.index.js, 5960.index.js);
identifier names are mine where minification removed them, but the control
flow and the stat()/mtime usage are verbatim.

Unrelated and not part of this report: ACP sessions don’t appear in
cursor-agent --resume. That’s expected — resume.session_scan walks
~/.cursor/chats only.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @tariqnoman,

You’re right on both counts. The ACP session list takes a session’s “last active” time from the modification time of its store.db file. Because that database runs in WAL mode, normal use only writes to the -wal file, so the time stays at creation. For sessions that are open in the running agent process, the list reports the session’s creation time in that same field. That’s why fixing only the file-based value wouldn’t change what you see.

I reproduced the file-time part on Linux too, so it isn’t specific to Windows. I’m passing this to the team along with your fix suggestion, including the point that the regular CLI chat list already keeps its own updated time in its metadata file.

In the meantime, your workaround of copying the -wal file’s modification time onto store.db (with the agent and the ACP client closed) is the right stopgap. As you noted, it only changes the timestamp and goes stale again after the next use.