Code Context Notes lets you attach contextual notes to your code without touching your source files. Notes live in a .code-notes/ directory and follow your code even when line numbers change.
- Open Extensions (
Ctrl+Shift+X/Cmd+Shift+X) - Search for Code Context Notes
- Click Install
Or from the command line:
code --install-extension jnahian.code-context-notesAvailable on the Open VSX Registry for VS Codium and other editors that use it.
- VS Code
1.80.0or higher - Git (optional — used for author detection; falls back to your system username)
From code:
- Select the code you want to annotate (or just place the cursor on a line)
- Press
Ctrl+Alt+N(Cmd+Alt+Non Mac) - Type your note (markdown supported)
- Click Save or press
Ctrl+Enter
From the sidebar:
- Click the Code Notes icon in the Activity Bar
- Click the + button in the sidebar toolbar
- Type your note and save
A CodeLens indicator appears above your code and the note shows up in the sidebar.
Notes are written as one markdown file per note under .code-notes/ at your workspace root:
project/
├── src/app.ts
└── .code-notes/
├── abc123-….md # one file per note
├── config.json # workspace policy (see Trust model)
├── INDEX.json # generated machine index
└── AGENTS.md # generated agent digest
Commit .code-notes/ to share notes with your team, or add it to .gitignore to keep them local. See Storage format for the on-disk details and which files to ignore.
- Usage guide — adding, editing, viewing, and navigating notes
- Note types & metadata — types, tags, priority, scope, references
- Agents & MCP — give AI coding agents access to your notes
- Trust model — control how agent writes are handled
- Configuration — all settings