Skip to content

DOM extraction fails: selectors do not match current Cursor UI (Cursor in foreground, recent version) #9

Closed

Description

@Meir553

Describe the bug

DOM extraction fails with repeated warnings in the log, even when Cursor is open and in the foreground. The logs show repeated lines like:

[state-manager] 10 consecutive failed extractions. Selectors may need updating or the Cursor window may be background-throttled.
[dom-extractor] Extraction failed: CDP timeout for Runtime.evaluate (5000ms)
[window-monitor] First cycle — 0 window(s), home=....
Error: extraction failed in UI

To Reproduce
Steps to reproduce the behavior:

  1. Start CursorRemote server via the VS Code extension
  2. Open Cursor IDE and make sure it's running and in the foreground
  3. Observe the server logs — DOM extraction warnings are present and windows list is empty

Expected behavior
Should extract windows/chat info from Cursor successfully when app is running and in foreground.

Context

  • CursorRemote extension version: 0.1.44-universal
  • Cursor IDE version: [please complete]
  • OS: Windows

Log excerpt:

[state-manager] 10 consecutive failed extractions. Selectors may need updating or the Cursor window may be background-throttled.
[dom-extractor] Extraction failed: CDP timeout for Runtime.evaluate (5000ms)
[window-monitor] First cycle — 0 window(s), home=.....

What I tried

  • Cursor is confirmed active and focused
  • Restarted both Cursor IDE and CursorRemote server
  • No suspicious errors in Cursor itself
  • Extraction warnings persist

Additional info

  • This suggests a selector mismatch with the current Cursor DOM
  • Please advise how to update selectors for new Cursor releases
  • Can supply more DOM structure/devtools output if needed

Activity

  1. len5ky commented on May 7, 2026

    @len5ky
    Owner

    @Meir553 — v0.1.45 is out (https://github.com/len5ky/CursorRemote/releases/tag/v0.1.45) with two fixes that very likely affect your case:

    Could you upgrade and try again? If you're still seeing extraction timeouts, please share:

    • Cursor version (Help → About)
    • The first ~50 lines of temp/server.log after a fresh start
    • Output of curl http://localhost:9222/json/list

    That'll tell us exactly what your Cursor's DOM looks like.

  2. added a commit that references this issue on May 27, 2026
  3. len5ky commented on May 27, 2026

    @len5ky
    Owner

    @Meir553 v0.1.46 likely fixes this. It's the same selector-drift class as #22. Cursor reskinned the model picker between builds, our selectors didn't, and extractions started timing out as a knock-on effect of the broader DOM changes. v0.1.46 ships:

    • selectors.json cascade for the model dropdown (.ui-model-picker__trigger first, legacy .composer-unified-dropdown-model as fallback).
    • Menu detection via data-testid → trigger's aria-controls → first visible [role="menu"], removing the hardcoded [data-testid="model-picker-menu"] dependency.
    • Edit-button-as-model filter, label cleanup, React useId handling.

    If your extraction was failing because a different selector group also moved (composer container, chat input, message rows), the model picker fix won't cover you. Please try v0.1.46 first. If it still fails, share:

    • Your Cursor version (Help → About).
    • Output of curl http://localhost:9222/json/list so I can see the workbench target.
    • The first ~50 lines of the relay log after a fresh start. Specifically the [dom-extractor] and [window-monitor] lines.
    • curl http://localhost:3000/health and curl http://localhost:3000/debug/state (with auth).

    That's enough for me to either reproduce or point you at the selector that needs updating.

  4. len5ky commented on Jul 7, 2026

    @len5ky
    Owner

    Closing as fixed in the latest releases: the glass sidebar agent rail is now supported and v0.1.46 fixed the model picker on Cursor 3.5+. If you're on Cursor 3.8.x and see no messages at all, that's #36 (fix shipping in v0.1.47). If something else is still off after updating, please open a fresh issue with your Cursor version.

  5. 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