Source reviewed November 17, 2026 · Windsurf integration
Keep the decisions behind the code
Native hooks connect supported Windsurf prompts, code writes, command activity, MCP results and Cascade responses to the Claude-Mem worker. The observer can turn that activity into saved project memory. Capture depends on the events Windsurf supplies.
Give the next session a starting point
The installer creates a project rules file at .windsurf/rules/claude-mem-context.md. It requests existing memory from the worker, or writes a placeholder when context is not available. This is a snapshot written during setup; automatic refresh after later work is not verified. Refresh and inspect it before relying on it in Cascade.
Keep capture and search separate
The Windsurf hook installer does not configure an MCP server. The generated rules file gives a bounded context snapshot; a separately configured memory connection lets you ask for more history. Verify that connection independently.
Choose how observations are processed
Your configured observer provider processes captured work into memory and may use its credits. Captured prompts and tool activity can be sent to that provider. Saved memory follows your existing sync settings; installing hooks does not change the provider.
Start with one project
Connect. Inspect. Start a new Cascade.
From the project directory you want to use, run the documented installer and select your observer setup. The hook installer needs the Claude-Mem worker files and Bun runtime:
npx claude-mem install --ide windsurfFollow the installer output to start the worker, then restart Windsurf to load its hooks. The generated rules file belongs to Claude-Mem and can be replaced during setup; keep hand-written rules in a separate file.
- Inspect
~/.codeium/windsurf/hooks.jsonand the project’s.windsurf/rules/claude-mem-context.md. A placeholder means useful context is not available yet. - Ask Cascade to make a harmless change in a disposable project, using a distinctive fact. Confirm a corresponding observation in the Claude-Mem work viewer and wait for processing.
- After processing finishes, rerun the same install command from the project directory, retaining your existing setup choices. This requests a fresh context snapshot from the running worker. Inspect the generated file, then start a new Cascade in that project. Ask about the saved fact and compare the answer with the original work. Test manual MCP recall separately if you configure it.
Before you connect
Which files does the installer change?
Hooks are merged into ~/.codeium/windsurf/hooks.json, and the current workspace is recorded in a project registry. The installer preserves unrelated hooks, refuses to overwrite corrupt hook JSON, and writes its generated project rules file. Keep your own instructions in a different rules file.
Is the rules file my complete memory history?
No. The generated context is capped at 6,000 characters and can be truncated. It may initially contain only a placeholder. To refresh the snapshot after new observations, rerun the installer from that project and inspect the file again. Use a separately configured MCP connection for detailed searches, and check important context against the original work.
Does this capture everything Cascade sees?
No. The adapter handles the supported hook events and fields. It reads command text for command events and MCP results for MCP events; that is not a guarantee of full terminal output, every file read or the complete conversation. Verify a representative task in the work viewer.
Has this guide tested my Windsurf environment?
This guide is based on the current installer and adapter source. It does not certify a particular Windsurf release, operating system or live account. Check the installed configuration, saved observation and next-session context on your own setup.
Follow the source
Keep your project story moving.
Verify capture and context in one project first. Add sync when you need your memory in another place.
