Repository navigation
feat(windows): support Cursor Agent sessions in the island - #231
Closed
BeyondBirthday07 wants to merge 28 commits into
Closed
BeyondBirthday07 wants to merge 28 commits into
BeyondBirthday07 wants to merge 28 commits into
Conversation
JhoanG956
pushed a commit
to JhoanG956/coucou
that referenced
this pull request
Oct 7, 2026
Takes Louis-CFM#231's Cursor support onto the shared pieces: its native ~/.cursor/hooks.json format and event list (installed and removed by the hardened writer, which refuses a "hooks" of an unexpected type instead of replacing it), and its event mapping and stop status → StopFailure, which now live in the relay's single normaliser. Left out of Louis-CFM#231: the relay answered every preToolUse with an allow and every prompt with continue — it now prints nothing, so Cursor's own permission rules decide; the hook command was Windows-only in a module every platform builds (the shared relay command works on both, and is quoted for cmd); and each session got its own agent_cursor_<session> pill — every Cursor session is on agent_cursor, the Mac's pill id. Co-authored-by: BeyondBirthday07 <sruhilmodi78@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thank you! Cursor Agent sessions are in Coucou for Windows 0.2.0 (https://github.com/Louis-CFM/coucou/releases/tag/windows-v0.2.0): your event mapping and stop-status handling were folded into the shared normaliser, with you credited as co-author (#307). Changes: no Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #72
Summary
Adds Windows support for Cursor Agent sessions in Coucou and surfaces them as first class sessions in the island.
This implementation uses Cursor's native hooks and the existing
coucou_agentrelay protocol. Cursor sessions remain display only in Coucou for this first version: permission decisions continue to be handled by Cursor itself.What Changed
Cursor Hook Relay
Added Cursor event normalization in
coucou_hook:sessionStart→SessionStartsessionEnd→SessionEndbeforeSubmitPrompt→UserPromptSubmitpreToolUse→PreToolUsepostToolUse→PostToolUsepostToolUseFailure→PostToolUseFailurestop→Stop/StopFailureCursor's
conversation_idis maped to Coucou'ssession_id.The workspace cwd is taken from
workspace_roots[0]when available, with the normal cwd fallback preserved.For stop events, Cursor statuses are mapped so that error stops become
StopFailure, while completed/aborted stops remain normalStopevents.Cursor tool output payloads are intentionally not forwarded to the island.
Display only / Faile open Behavior
Cursor hooks never wait for a Coucou permission decision.
The relay immediately emits Cursor-compatible responses:
preToolUse→{"permission":"allow"}beforeSubmitPrompt→{"continue":true}This keeps Cursor usable even when Coucou is unavailable.
I also manually verified that Cursor agent continues normally when the Coucou application is completely stopped.
Cursor hook Config.
Added windows support for managing:
~/.cursor/hooks.jsonCoucou installs hooks for:
sessionStartsessionEndbeforeSubmitPromptpreToolUsepostToolUsepostToolUseFailurestopThe hook config. logic:
hooks.jsondoes not existSettings UI
Added a Cursor agent section to windows settings with:
The install, reinstall, backup, uninstall, and reinstall flows were manually tested against a real Cursor installation.
Island Session Support
Cursor conversations now get independent Coucou session IDs:
agent_cursor_<session_id>Cursor sessions appear as their own pills, for example:
Cursor · coucouThe island now displays Cursor session activity for:
External agent sessions now use the normal session/activity view instead of falling through to the Integration / Key config. card.
Cursor specific finished/error labels are also shown instead of the previous Clause Code fallback text.
Validation
Automated:
cargo test -p coucou-hookcargo test -p coucounpm run buildgit diff --checkManual:
Cursor · coucouCursor finishedScope
This PR intentionally implements the Windows side first.
Cursor sessions are display only in the version. Coucou does not provide Allow/Deny controls for Cursor permission requests, Cursor remains responsible for permission handling.
macOS Cursor hook installation/support can follow separately.