Capture observations & summaries from Anthropic's Claude Code IDE extension (the surface that runs inside Cursor / VSCode) — distinct from the existing cursor platform
#2161
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR
claude-mem currently treats two integration platforms as first-class:
claude-code→ the terminal CLI (npx @anthropic-ai/claude-code).cursor→ Cursor's own native AI agent (the chat panel built into Cursor itself), wired up viabun run cursor:install,beforeSubmitPrompt, and.cursor/rules/claude-mem-context.mdc(see #838, #633).There is a third surface that is currently uncovered: Anthropic's official Claude Code IDE extension (the VSCode-style extension shipped by Anthropic, which also runs inside Cursor since Cursor is a VSCode fork). This is neither the terminal CLI nor Cursor's own AI agent. In a session running on this surface:
.mcp.jsonloads correctly →mem-searchworks.This issue requests treating the IDE extension as a third platform (e.g.
claude-code-ide) alongside the two already supported.Acknowledgement of existing work
I want to be explicit that I know about the existing Cursor support before filing this:
package.jsonexposescursor:install,cursor:uninstall,cursor:status,cursor:setup.integration:cursor) fixed a normalizer bug where Cursor'sbeforeSubmitPromptevent sendsconversation_id/generation_idinstead ofsession_id..cursor/rules/claude-mem-context.mdcfile."All of that targets Cursor's own AI agent (its chat panel, governed by
.cursor/rules/and Cursor's hook events likebeforeSubmitPrompt). My report is about a different surface, described below.The three surfaces, side by side
npx @anthropic-ai/claude-codein a terminalclaude-codeplatform; PascalCase hooks (SessionStart,UserPromptSubmit,PostToolUse,Stop,SessionEnd) all fire.cursor:install,beforeSubmitPrompt,.cursor/rules/claude-mem-context.mdc.The third row is what this issue asks about.
Environment
OS: macOS 24.3.0 (darwin, Apple Silicon)
Anthropic Claude Code:
npx @anthropic-ai/claude-code(latest at time of report)Host IDE: Cursor (latest), running Anthropic's official Claude Code IDE extension
claude-mem versions present in
~/.claude/plugins/cache/thedotmack/claude-mem/:12.3.8,12.3.9,12.4.7~/.claude-mem/settings.json→ worker port37701, host127.0.0.1, all defaults otherwise.~/.claude/settings.json(relevant excerpt):Reproduction
curl http://127.0.0.1:37701/health→{"status":"ok","activeSessions":9,…}).claudein a terminal, do a fewRead/Bashcalls, exit. → Log shows the full chain:[HOOK] → PostToolUse: …,[QUEUE] ENQUEUED type=observation,[HOOK] → Stop: Requesting summary,[DB] STORED summaryId=…. ✅Read/Bashcalls, end the conversation. → Log shows only:[HOOK], no[QUEUE], no[DB], noobservation, nosummaryfor this session.Empirical evidence from my machine
Excerpt from
~/.claude-mem/logs/claude-mem-2026-04-27.log(local time; current wall-clock is20:00):Between 19:56 and 20:00 I executed many
Read/Bash/WebFetchcalls inside the Claude Code IDE extension running in Cursor. Not a single[HOOK],[QUEUE], or[DB]entry was produced for them. TheClaude-mem search server startedlines confirm.mcp.jsonis being honored — it's specifically the hook layer that's silent on this surface.Why I think this is happening (best-effort root cause)
Anthropic's Claude Code IDE extension appears to use a different hook event vocabulary than the terminal CLI — specifically camelCase event names and a smaller event set. Strong precedent that this is the case:
superpowers@claude-plugins-official/5.0.7ships two hook files side by side:hooks/hooks.jsonSessionStart(PascalCase — terminal CLI form)hooks/hooks-cursor.jsonsessionStart(camelCase — IDE-extension form)So
superpowersalready encodes the assumption that the IDE-side surface needs camelCase event names, and it ships an explicithooks-cursor.jsonfor that case. (The naming "cursor" there is because Cursor is the most common IDE host that surfaced the gap; the same file applies whenever the Claude Code IDE extension runs, including in plain VSCode.)claude-mem's
hooks/hooks.jsonregisters only PascalCase events:SessionStart,UserPromptSubmit,PreToolUse,PostToolUse,Stop,SessionEnd. Nothing matches what the IDE extension fires, so nothing fires.Structural parallel to #1270
This is the same shape as #1270 ("Codex CLI: read now via MCP, write when hooks land"):
mem-searchworks in Cursor's Claude Code panel — I've verified).hooks.jsonregisters.The key difference vs Codex: the Claude Code IDE extension does fire hooks — they just have different event names (camelCase) than the terminal CLI does, evidenced by
superpowers/hooks-cursor.json.Suggested fix
Add a third platform alongside the existing
claude-codeandcursorintegrations — provisional nameclaude-code-ide. Concretely:hooks/hooks-claude-code-ide.json, mirroringsuperpowers/hooks-cursor.json) using the camelCase event names the IDE extension fires.worker-service.cjs hook claude-code <event>worker entrypoints — only the trigger names change, not the worker contract.claude-code-ide:install/:statusscripts inpackage.jsonparallel to thecursor:*ones, so users can install just this surface explicitly.I deliberately do not suggest adding camelCase keys directly to the existing terminal
hooks.json, because that conflates the IDE-extension surface with the terminal CLI surface. The cleaner architectural move is a new platform entry, matching howcursoris its own thing today.If only a subset of camelCase hook events is supported by the IDE extension at the time of writing (e.g.
sessionStartanduserPromptSubmitfor sure,postToolUse/stop/sessionEnduncertain), even partial support — saysessionStart+userPromptSubmit+postToolUse— would unlock observation capture for IDE-extension sessions and would already be a huge win.Open questions for the maintainer
superpowersonly exercisessessionStart, so I can't infer the full set from there alone.claude-code-ideor similar), or would you rather express it as a sub-mode of the existingclaude-codeplatform with a--surface=idestyle switch?hooks-claude-code-ide.json(initially with whatever events I can confirm work) plus aclaude-code-ide:installscript be welcome?Workarounds I'm using in the meantime
claudein a terminal.Happy to attach the full
claude-mem-2026-04-27.log, run experiments to enumerate which camelCase event names the IDE extension actually fires, or test draft hook files. Thanks for the great plugin and for the work you've already done on the Cursor-native side.Beta Was this translation helpful? Give feedback.
All reactions