Skip to content

Use CURSOR_CONVERSATION_ID as session id on Cursor (with temp debug logs)#12

Draft
swarup-padhi-glean wants to merge 1 commit into
mainfrom
use-cursor-conversation-id
Draft

Use CURSOR_CONVERSATION_ID as session id on Cursor (with temp debug logs)#12
swarup-padhi-glean wants to merge 1 commit into
mainfrom
use-cursor-conversation-id

Conversation

@swarup-padhi-glean

Copy link
Copy Markdown
Contributor

What

Maps Cursor's CURSOR_CONVERSATION_ID to the normalized GLEAN_SESSION_ID in plugins/glean/start.sh, mirroring how CLAUDE_CODE_SESSION_ID is handled. Host-awareness stays in the launcher; the bundle keeps reading only GLEAN_SESSION_ID (src/session-id.ts unchanged in behavior). Cursor previously fell back to a per-process UUID; now it uses the real conversation id.

⚠️ Temporary debug logs — REMOVE BEFORE MERGE

Marked DEBUG (remove before merge):

  • plugins/glean/start.sh: stderr line showing which host var fed the session id.
  • src/session-id.ts: stderr line showing the resolved id (host vs fallback).

These are only to verify the wiring in Cursor; strip them (and rebuild dist) before merge.

Version

Manifests bumped 0.2.24 → 0.2.25.

Note

The old CODEX_THREAD_ID mapping was dropped when packages/codex was removed; this PR scopes to Cursor only.

plugins/glean/start.sh now maps Cursor's CURSOR_CONVERSATION_ID to the
normalized GLEAN_SESSION_ID, mirroring how CLAUDE_CODE_SESSION_ID is
handled (host-awareness stays in the launcher; the bundle keeps reading
only GLEAN_SESSION_ID). Bumps plugin manifests 0.2.24 -> 0.2.25.

Includes TEMPORARY debug logs (start.sh + src/session-id.ts) marked
'DEBUG (remove before merge)' so the resolved session id can be traced
while testing in Cursor. These must be removed before merge.
@swarup-padhi-glean

Copy link
Copy Markdown
Contributor Author

@mohit-gupta-glean @eshwar-sundar-glean unfortunately cursor doesn't inject the CURSOR_CONVERSATION_ID var into the mcp server process env, so this isn't avl and we will have to fallback to random uuid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant