Three layers, one corpus

VS Code, Claude Code, and Mneme HQ each do one thing. They stack:

Layer Role Governed by Mneme?
VS Code IDE — the editor surface, terminal, and extension host Out of scope (no code generation)
Claude Code AI coding agent running inside the VS Code terminal Yes — PreToolUse hook
GitHub Copilot Inline AI suggestions inside the VS Code editor Not yet at edit time; enforced in CI today
Mneme HQ Architectural governance layer — corpus + enforcement The enforcement layer itself

The important property: Mneme governs the agent, not the editor. The same hook fires whether Claude Code is launched from the VS Code integrated terminal, an external terminal, or a remote SSH session. VS Code is a host; the governance follows the agent.

What works today, what is coming

Claude Code inside VS Code — full enforcement, zero extra setup. If you are already running Claude Code in the VS Code terminal, the standard installer wires up the PreToolUse hook in .claude/settings.json. Every Edit, Write, and MultiEdit the agent attempts is checked against your decision corpus before it touches the filesystem.

Copilot inside VS Code — governed in CI, not yet at edit time. Copilot's inline suggestions enter the buffer through the editor itself, not as tool calls Mneme can intercept. Until a native Copilot integration lands, the enforcement point for Copilot-generated code is the GitHub Actions gate: mneme check runs against every PR diff and blocks merges that violate recorded decisions. The diff doesn't care which agent wrote it.

Mneme governs the agent, not the editor. The PreToolUse hook fires on the tool call — not on the keystroke. Anything Claude Code edits passes through; anything Copilot or a human types directly into the buffer is caught at the CI gate instead.

Install

If you already have Claude Code installed in VS Code, the steps are the same as the Claude Code integration:

  1. Install the package
    pip install mneme
  2. Initialise project memory (if you don't have one yet)
    mkdir .mneme
    # Create .mneme/project_memory.json — see examples/project_memory.json for the schema.
  3. Run the installer

    Project-scoped (recommended — only affects this project):

    python scripts/install_claude_code.py

    User-scoped (applies to all Claude Code sessions, including those launched from any VS Code window):

    python scripts/install_claude_code.py --user
  4. Verify inside VS Code

    Open the project in VS Code, open the integrated terminal, run claude, and ask the agent to edit a file in a way that violates a recorded decision. The hook should block the edit and surface the decision id back to Claude Code — visible directly in the VS Code terminal pane.

VS Code-specific tips

Integrated terminal vs external terminal

There is no difference from Mneme's point of view. The hook reads $PATH and .claude/settings.json from the environment Claude Code is launched in. If mneme-hook is on $PATH in the VS Code integrated terminal (run where mneme-hook to confirm on Windows, which mneme-hook on macOS / Linux), the hook fires.

Remote-SSH and WSL

VS Code's Remote-SSH and WSL workflows put Claude Code inside the remote environment. Install mneme in that same environment — not on the local Windows host — and the hook works identically. The .mneme/project_memory.json file lives in the repository, so it travels with the project regardless of where the agent runs.

Multiple workspaces, one decision corpus

VS Code multi-root workspaces with several repos behave fine: the hook resolves .mneme/project_memory.json from the file being edited, walking up to the nearest ancestor. Each repo can have its own corpus, and Claude Code's edits are checked against the right one regardless of which folder is focused.

Why not a VS Code extension instead?

A VS Code extension would only see what the user types directly into the editor. The interesting volume — the AI-generated edits worth governing — arrives as agent tool calls, not as keystrokes. Intercepting at the agent's PreToolUse layer is both more precise and more general: the same enforcement runs in any editor that hosts the agent, not just VS Code.

For Copilot specifically, that calculus may shift — Copilot's inline suggestions don't expose a tool-call layer the way Claude Code does, and a VS Code extension may be the right surface for that case. That's on the roadmap. Today, CI carries Copilot enforcement; the editor-time hook carries Claude Code.

FAQ

Does Mneme HQ govern Copilot suggestions in VS Code today?
Not yet. Copilot inline suggestions land in the editor through a different surface than Claude Code's tool calls, so the PreToolUse hook does not intercept them. Mneme catches Copilot-generated code at the next layer: the GitHub Actions enforcement gate on every PR diff. A native Copilot integration is on the roadmap; until then, CI is the enforcement point for Copilot output.
Do I install a VS Code extension to enable Mneme?
No. Mneme runs as a Claude Code PreToolUse hook configured in .claude/settings.json — the hook fires regardless of whether Claude Code is launched from the VS Code integrated terminal, the standalone terminal, or any other host. There is no Mneme VS Code extension to install.
Does the hook work in WSL or remote VS Code sessions?
Yes. The hook runs wherever Claude Code runs. In WSL or a VS Code Remote-SSH session, install mneme inside the remote environment (the same one Claude Code is invoked from) and the hook works identically. The .mneme/project_memory.json file lives in the repo, so it travels with the project.
Why route enforcement through Claude Code instead of VS Code directly?
VS Code does not generate code on its own — humans and AI agents do. Mneme governs the agent. Claude Code exposes a PreToolUse hook that intercepts every Edit, Write, and MultiEdit before disk; that is the deterministic enforcement point. A VS Code-level extension would only see what the user types directly, missing the bulk of AI-generated change.