fix(windows): detect cursor bundled node process - #3034
Conversation
📝 WalkthroughWalkthroughCursor Agent detection now validates bundled Windows Node invocations against the versioned Cursor path. Tests reject lookalike paths that use an unrelated Node runtime. The changelog uses the broader Windows panes wording. ChangesWindows Cursor Agent detection
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🔵 Low · up to The change is mergeable with owner awareness or follow-up, but the Windows-specific matcher should be gated to Windows to prevent Unix builds from incorrectly recognizing matching Windows-style process arguments. Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 93af3e36-dafd-431a-922a-ae2cb93c7c14
📒 Files selected for processing (2)
docs/next/CHANGELOG.mdsrc/detect/mod.rs
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Greptile SummaryHerdr now preserves Cursor Agent detection after its Windows launcher hands off to the bundled Node process.
Confidence Score: 4/5The PR is not yet safe to merge because unrelated Node processes can still be misidentified as Cursor. The reply states that the broad matcher was fixed by requiring node.exe and index.js to share a directory, but an arbitrary directory ending in cursor-agent/versions/ containing both files remains a concrete counterexample. Files Needing Attention: src/detect/mod.rs
|
| Filename | Overview |
|---|---|
| src/detect/mod.rs | Adds Cursor's bundled-Node detector and tests, but the attempted path-tightening still accepts unrelated same-directory lookalikes. |
| docs/next/CHANGELOG.md | Documents persistent Cursor Agent detection after the Windows launcher handoff. |
Reviews (2): Last reviewed commit: "fix(windows): constrain cursor runtime d..." | Re-trigger Greptile
| (package.eq_ignore_ascii_case("cursor-agent") | ||
| && versions.eq_ignore_ascii_case("versions") | ||
| && !version.trim().is_empty()) |
There was a problem hiding this comment.
Cursor path suffix remains broad
When an unrelated node.exe and index.js share any directory ending in cursor-agent/versions/<nonempty>, this matcher identifies the process as Cursor, causing spurious Cursor-specific agent and status tracking.
Knowledge Base Used: Agent detection, Ghostty integration, and configuration
There was a problem hiding this comment.
disagree: Herdr process identity is signature-based rather than tied to a trusted install root. This requires the exact bundled node.exe/index.js pair in one cursor-agent/versions directory; requiring the default AppData root would break redirected LOCALAPPDATA. A process deliberately recreating the full official bundle signature is no more distinguishable than one naming itself cursor-agent.
There was a problem hiding this comment.
Fair point — the signature is more constrained than my initial comment implied. The conjunction of node.exe + index.js in the same directory, under a path component sequence of exactly cursor-agent/versions/<nonempty>, is specific enough that an accidental collision is extremely unlikely. And you're right that anchoring to AppData\Local would break redirected LOCALAPPDATA environments, which is a real Windows enterprise concern.
The threat model here is also relevant: this is process identification for tracking, not a trust boundary, so the bar for "specific enough" is whether false positives are plausible in normal operation — not whether the path is cryptographically verified.
I'll withdraw the concern. The current implementation is appropriate for Herdr's signature-based identity model.
Should I remember this as a rule: "Herdr process detection is signature-based; do not flag detectors for lacking a trusted install-root anchor, as path anchoring would break redirected LOCALAPPDATA and is outside the threat model"?
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 942b277d-9ccf-482c-8bd6-b2bd5d6a06ce
📒 Files selected for processing (1)
src/detect/mod.rs
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.
* fix: match Windows Ctrl+digit keybindings (herdrdev#2913) refs herdrdev#2910 * fix: sync powershell process working directory (herdrdev#2879) * fix: reap ctrl-click url openers (herdrdev#2906) * fix: reap ctrl-click url openers refs herdrdev#2903 * fix: scope linux opener test import refs herdrdev#2903 * test: isolate url opener regression refs herdrdev#2903 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix(docs): link agents to config reference data * feat(website): plugin marketplace discovery shelves — trending and new arrivals * fix(website): raise timeout on docs release integration test for slow builders * fix: retry Windows installer activation after transient locks (herdrdev#2921) refs herdrdev#2916 * fix: isolate hidden pane render cadence (herdrdev#2892) refs herdrdev#2890 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix: preserve macOS IME commits in report-all mode (herdrdev#2947) * feat: make Windows generally available * docs: publish preview documentation * docs: finalize 0.8.1 release notes * release: v0.8.1 * fix(ci): publish v0.8.1 documentation * fix: restore v0.8.0 as stable release * fix(perf): eliminate redundant terminal wake work (herdrdev#2962) * fix(perf): eliminate redundant terminal wake work * fix(perf): harden release benchmark gate * test(perf): strengthen performance guardrails * fix(theme): keep active terminal row visible under cursor (herdrdev#2989) refs herdrdev#2987 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix(cli): exit quietly when output pipes close (herdrdev#2996) refs herdrdev#2994 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * docs: finalize 0.8.2 release notes * release: v0.8.2 * docs: update website manifest for v0.8.2 * docs: publish preview documentation * fix: strip ansi sequences from tab bar status (herdrdev#3003) * fix: strip ansi sequences from tab bar status refs herdrdev#3001 * docs: clarify tab bar escape sequence scope refs herdrdev#3001 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix(input): preserve mouse forwarding through handoff (herdrdev#3002) refs herdrdev#3000 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix: honor mouse capture config in terminal attach (herdrdev#2995) refs herdrdev#2992 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix: synchronize plugin pane pwd (herdrdev#2985) * fix: synchronize plugin pane pwd refs herdrdev#2984 * refactor: isolate plugin pwd platform policy refs herdrdev#2984 * docs: fix changelog conflict resolution --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Co-authored-by: Can Celik <ogulcancelik@gmail.com> * fix: add claude screen activity fallbacks refs herdrdev#1630 refs herdrdev#2241 * fix(windows): detect cursor bundled node process (herdrdev#3034) * fix(windows): detect cursor bundled node process refs herdrdev#3032 * docs: clarify cursor detection scope * fix(windows): constrain cursor runtime detection refs herdrdev#3032 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * ci: support immutable preview releases * chore: remove akbash maintainer authority * test: use native path in docs parity assertion (herdrdev#3043) * chore: pin kennel maintainer identities * chore: keep kennel authority private * fix(graphics): isolate oversized kitty images (herdrdev#3035) * fix(graphics): isolate oversized kitty images refs herdrdev#3033 * fix(graphics): budget pane image cleanup refs herdrdev#3033 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix: preserve multiline paste in terminal attach (herdrdev#3056) refs herdrdev#3054 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix: keep background Claude MCP tasks working (herdrdev#3094) * fix: match generated characters in prefix bindings (herdrdev#3085) refs herdrdev#3079 * fix: publish Claude MCP detection manifest * docs: document macos keychain launch context refs herdrdev#966 * fix: preserve focus after background worktree removal (herdrdev#3099) * fix: copy selections before delayed mouse release (herdrdev#3102) refs herdrdev#3100 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> * fix: clear Windows Terminal identity in panes (herdrdev#3127) * fix(windows): preserve non-us shifted text (herdrdev#3055) * fix(windows): preserve non-us shifted text refs herdrdev#3045 * fix(windows): retain shifted key repeat lifecycle refs herdrdev#3045 * feat: add per-mode theme overrides (herdrdev#2324) * feat: add per-mode theme overrides allow [theme.custom.light] and [theme.custom.dark] blocks so custom overrides can differ per resolved appearance when auto_switch flips. precedence: theme defaults, then [theme.custom], then the block for the active mode. configs without the new blocks resolve unchanged. refs herdrdev#837 * docs: complete per-mode theme documentation --------- Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com> * fix(windows): add local cmd installer bootstrap (herdrdev#3133) * fix(windows): add local cmd installer bootstrap refs herdrdev#2751 * fix(windows): bound installer downloads refs herdrdev#2751 * fix(api): start lifecycle subscriptions from live events (herdrdev#3134) refs herdrdev#1270 * fix: keep omp panes working through scheduled continuations (herdrdev#3122) refs herdrdev#2851 * fix: serve a google-eligible favicon * fix(graphics): batch kitty image row lifecycle (herdrdev#3166) * fix(graphics): coalesce terminal kitty placements A Unicode-placeholder image arrives as one placement per viewport row it covers, and after 624dfd4 the budgeted encoder emitted one placement per frame, so every redraw painted images one row per frame. * fix(graphics): coalesce only pure kitty re-displays Keep pixel uploads and superseded-image deletes in a transaction of their own: a placement joins the coalesced transaction only when its image is uploaded and its source already maps to that image, and nothing joins after an upload or a delete. * fix(graphics): batch kitty image row lifecycle --------- Co-authored-by: kataokatsuki <kataokatsuki@users.noreply.github.com> --------- Co-authored-by: Can Celik <ogulcancelik@gmail.com> Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com> Co-authored-by: akbash <akbash@herdr.dev> Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Co-authored-by: kangal-bot <285672167+kangal-bot@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alex <a.neyman17@gmail.com> Co-authored-by: caner-akca <94343893+caner-akca@users.noreply.github.com> Co-authored-by: kataokatsuki <kataokatsuki@users.noreply.github.com>
Issue
Starting Cursor Agent as bare
cursor-agentfrom a Windows PowerShell pane briefly labels it, then leaves it unknown. The pane disappears from agent commands and status tracking.Problem
Cursor's short-lived launcher hands off to a bundled Node process. Herdr did not recognize the persistent process's versioned Cursor executable and entrypoint paths.
How did we fix it?
Herdr now recognizes Cursor when its bundled
node.exeandindex.jsshare the same versionedcursor-agentdirectory. Other scripts, alternate entrypoints, and lookalike paths driven by a different Node runtime remain unknown. Cursor status still comes from its existing screen manifest.Verification
The reporter's exact Node command failed identification before the change and resolves to Cursor afterward. Focused negative cases remain unidentified. GitHub's Linux, macOS, Windows, and ConPTY checks pass. Local checks passed 3,487 tests; one live-handoff test cannot discover its replacement process because this harness places
CARGO_TARGET_DIRoutside the checkout, although its logs confirm the process starts.refs #3032