Skip to content

Messages not extracted on Cursor 3.8.x: chat DOM switched to virtualized list, data-flat-index removed #36

Closed

Description

@Borman97

Summary

After a recent Cursor rollout, message extraction returns 0 messages. The relay
still detects chat tabs (chatTabs: N) but every snapshot has msgs=0, so no
Telegram topics are created and the web client shows no conversation content.

Environment

  • CursorRemote: 0.1.46 (extension)
  • Cursor: 3.8.11 (Electron 40 / Chrome 144), Windows 10
  • Started ~June 20, 2026, WITHOUT any Cursor binary update (workbench bundle
    unchanged) — i.e. shipped via a server-side feature flag, so it activates
    for users gradually and is not tied to a Cursor version bump.

Root cause

Cursor's chat moved to a virtualized message list. The message wrappers no
longer carry data-flat-index, which the extractor depends on:
U.querySelectorAll("[data-flat-index]") (server parser) and several
document.querySelectorAll('[data-flat-index]') calls in the in-page action
scripts. With the new DOM these all match 0 elements.

New DOM (live CDP probe of the chat container)

Container / rows:

  • composer-messages-container
  • virtualized-composer-messages-scroll-container
  • virtualized-composer-messages-row (×25 mounted)
  • composer-rendered-message (×20), composer-message-blur, composer-message-markdown,
    composer-human-message, composer-message-group

Per-message data attributes now present (NO data-flat-index):

  • data-index, data-message-index, data-message-id,
    data-message-role, data-message-kind

Probe counts inside [data-composer-id]: data-flat-index: 0,
data-message-index: 20, data-message-id: 20, data-message-role: 29,
data-message-kind: 29.

Suggested fix

  • Select message wrappers via [data-message-index] (or by data-message-role/
    data-message-kind) and read the sequential index from data-message-index
    instead of data-flat-index.
  • Account for virtualization: only ~20–25 rows are mounted in the DOM at a time
    (scroll-dependent), so full-history extraction needs to handle the virtual
    scroller rather than assuming all messages are in the DOM.

Activity

  1. leandrobi commented on Jun 23, 2026

    @leandrobi

    +1 — same on Windows 11, Cursor 3.8.11, CursorRemote 0.1.46.

    • Web shows "No messages in this chat yet" but Connected + tabs OK
    • Telegram: approvals work ("Run in background"), chat text does not sync
    • Telegram → PC works (prompt injected); PC → Telegram response does not
    • npm run probe: no [data-flat-index], only ui-thinking-collapsible
    • Grammy hung on Windows; raw transport works
  2. deyurao commented on Jun 24, 2026

    @deyurao

    I ran into the same issue on Windows with CursorRemote 0.1.46 and Cursor 3.8.x: sending prompts from the browser worked, and the prompt appeared in Cursor Agent, but Cursor’s response did not sync back to the browser/Telegram.

    The local workaround was to patch the installed CursorRemote extension directly, without reinstalling/rebuilding the VSIX.

    Root cause seems to be the same as described here: Cursor Agent no longer exposes message wrappers with data-flat-index; the new DOM uses attributes like data-message-index, data-message-id, data-message-role, and data-message-kind. The old extractor therefore matches zero messages.

    Minimal patch:

    [data-flat-index]

    to:

    [data-message-index], [data-flat-index]

    and:

    el.getAttribute("data-flat-index")

    to:

    el.getAttribute("data-message-index") || el.getAttribute("data-flat-index")

    On Windows, patch the active installed extension folder, not a backup folder:

    C:\Users\<you>\.cursor\extensions\cursor-remote.cursor-remote-0.1.46-universal
    

    After patching, fully restart Cursor with CDP enabled:

    taskkill /IM Cursor.exe /F
    Start-Process "C:\Program Files\Cursor\Cursor.exe" -ArgumentList "--remote-debugging-port=9222"

    Then run:

    Ctrl+Shift+P -> CursorRemote: Restart Server
    

    I also made a small PowerShell script that automates this by finding the active CursorRemote extension folder, skipping .backup-* folders, creating a backup, and patching compiled .js/.mjs/.cjs files in place.
    https://www.dropbox.com/scl/fi/wa4cbh5ljidhcsy27t70u/patch-cursorremote-cursor38.ps1?rlkey=25m90zc8z5cbfqc73wnsqufys&st=4gn7yust&dl=0

    This is only a workaround. It should restore basic latest-message extraction, but it does not fully solve long-history extraction because the new Cursor Agent chat uses a virtualized list, so only visible rows are mounted in the DOM.
    :::

  3. tmac14 commented on Jun 24, 2026

    @tmac14

    Project is abandoned by author?

  4. deyurao commented on Jun 24, 2026

    @deyurao

    Not sure but at least we have source code to fix by ourselves

  5. added a commit that references this issue on Jul 7, 2026
  6. len5ky commented on Jul 7, 2026

    @len5ky
    Owner

    Fixed in v0.1.47 — the extractor now handles the Cursor 3.8+ DOM (message-index wrappers and role-based message nodes), with the legacy path unchanged for older versions. Thanks @gilzhaiek and @cachrisman for the PRs that shaped the fix (#39, #38).

    One caveat carried over from before: only currently-rendered rows are extractable, so scrolled-out history in long sessions is still invisible — that's now tracked separately. Please update and report back if messages are still missing on 3.8.x.

  7. added a commit that references this issue on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions