ContoraA local workspace memory and AI-context export extension for VS Code and Cursor. It remembers what you were doing in a project (task, notes, open files, working set, Git paths), records a short event history, and can copy a structured summary to the clipboard for LLMs — without cloud sync and without reading chat logs. Current version: see What you get (at a glance)
Does not: sync to the cloud, read Cursor Chat, or call external APIs for your session data. Does not replace Requirements
Quick start
Optional: add Commands (Command Palette)
Bind keys in Keyboard Shortcuts by searching for these IDs. Configuration (
|
| Setting | Default | Role |
|---|---|---|
autoRestoreOnOpen |
true |
Re-open editors from last state.json when opening the folder. |
maxRestoreEditors |
8 |
Max tabs to open on restore (0 = none on auto-restore). |
workingSetMaxFiles |
40 |
Max paths in working set (recentFiles). |
defaultAIMode |
feature |
debug | feature | refactor | review — affects ranking weights and export instruction tone. |
exportFormat |
markdown |
markdown | cursor | json | claude | openai | mcp. |
persistEventLog |
true |
Append events to .contora/events/<sessionId>.jsonl. |
maxEventBuffer |
200 |
In-memory event ring buffer cap. |
eventsInPrompt |
50 |
Recent events embedded in export (# RECENT EVENTS). |
maxPriorityFiles |
12 |
Cap on priority file list (also bounded by mode strategy). |
exportTokenBudget |
0 |
Approx max tokens (0 = unlimited). |
useDefaultIgnoreRules |
true |
Skip noisy paths (node_modules, .git, …). |
extraIgnoreSubstrings |
[] |
Extra case-insensitive substring excludes on relative paths. |
cooccurrenceWindow |
10 |
Sliding window for co-occurrence graph. |
mergeDiskEventLog |
true |
On workspace sync, merge JSONL from disk into ring buffer (same sessionId). |
writeLatestMemoryOnSave |
true |
After save, write .contora/memory/latest-memory.json (mirror for tooling). |
On-disk layout
<workspace-root>/
├── .contoraignore # optional: one path substring per line, # comments
└── .contora/
├── state.json # main snapshot
├── events/<sessionId>.jsonl # optional append-only log
├── snapshots/checkpoint-*.json
└── memory/latest-memory.json # optional mirror after “Save session state”
Older workspaces may still have .context-recall/ and .contextrecallignore; Contora reads them for compatibility but new writes go to .contora/ and .contoraignore.
Do not commit .contora/ if your team treats it as personal scratch — add it to .gitignore if needed.
Privacy
All session data stays under the workspace root in .contora/ (with legacy read paths as above). This extension does not add telemetry and does not intentionally send your session data over the network.
Installation & development
From VSIX: Extensions → ⋯ → Install from VSIX… → reload window.
From source:
git clone https://github.com/frankleeeeeee/context-recall.git
cd context-recall # or your clone folder, e.g. sessionrecall
npm install
npm run compile
Press F5 for Extension Development Host. Package: npm run compile then npx @vscode/vsce package.
Migration
- Contora (current): primary data dir
.contora/, settings/commandscontora.*, ignore.contoraignore. - Legacy
.context-recall//.contextrecallignore— still read where applicable; saving moves state forward under.contora/. - Legacy
.project-recall/→ rename to.context-recall/(or.contora/) and movestate.jsonif you still have that layout. - Old
projectRecall.*→contextRecall.*(historical) →contora.*(current). - Old
gitModified[]only → migrated togitWorkingon load (v0.3.0+).
Project structure (high level)
src/
├── extension.ts
├── core/ # context engine: semantic, ranking, schema, ignore, budget, graph, events, snapshots, compression, focus, quality, adapters
├── storage/
├── scanner/
├── state/
├── ui/
└── types/
docs/UPGRADE_PLAN_2.x.md
Contributing
PRs welcome. Run npm run compile before submitting.
License
Distributed under the MIT License. Copyright (c) 2026 frankleeeeeee.
Usage guide (detailed)
What it does in plain terms: under your opened folder, it keeps task, notes, open tabs, a working set (files you recently focused or saved), Git staged / working-tree paths, and a short event stream. When you need an LLM, Export AI context copies a formatted bundle to the clipboard. No cloud upload and no reading of chat history.
When to use which action
| Situation | What to do |
|---|---|
| End of day / pin current progress | Sidebar Save now (writes state.json). |
| Before a risky refactor or branch switch | Save snapshot (checkpoint on disk). |
| Undo to a saved point | Restore snapshot → pick a checkpoint file. |
| Explain state to an LLM | Copy AI context → paste into the model. |
| Resume yesterday’s files | Leave auto-restore on, or Restore editors (opens paths only — not full IDE layout). |
| Ranking polluted by build dirs | Keep default ignore on; add .contoraignore and/or extraIgnoreSubstrings. |
| Export too long | Lower exportTokenBudget, maxPriorityFiles, eventsInPrompt. |
Sidebar walkthrough
- File → Open Folder (required; single-file windows have no workspace root).
- Activity bar → Contora → sidebar Contora.
- Top row: Copy AI context, Save now, Restore editors, Save snapshot, Restore snapshot (same as Command Palette commands).
- Current task / Notes below; click a path in the lists to open that file. The working set is “recently focused or saved”, not every tab ever opened.
Command Palette
Ctrl+Shift+P / Cmd+Shift+P → type Contora → pick any of the five commands above. Bind keys via Keyboard Shortcuts using the command IDs in the table earlier.
.contoraignore
At the workspace root, one path substring per line (case-insensitive); if a relative path contains that substring, it is excluded from ranking, summary, and export lists. Lines starting with # are comments. Legacy .contextrecallignore is still honored.
Example:
# build output
dist/
coverage/
Export / “intelligence” (v0.4.x)
- Modes
debug/feature/refactor/review— change importance weights only; they do not change how you edit code. - Semantic block — heuristic summary (hot areas, intent line, pattern, optional ranking pipeline debug). No LLM API calls.
- JSON — Schema v2 may include optional
intelligence(intent / pattern / focus) andquality(score + warnings) for downstream tools.
Backup
Zip the whole .contora/ folder to back up local memory (include .context-recall/ only if you have not migrated yet). Deleting data dirs clears workspace-local memory for that project (it will rebuild as you work).
For the layered design notes (2.0 → 2.1 merge), see docs/UPGRADE_PLAN_2.x.md.