Context Restore
Save, restore, and share your full developer context — open files, cursor positions, Git state, and AI conversations.
Features
📸 Session Snapshots
Save your entire working state at any moment:
- All open files with exact cursor positions
- Unsaved buffer contents
- Active file focus
- Git branch, changed files, staged files
🔄 One-Click Restore
Reopen everything exactly where you left off — same files, same lines. Works even after a reboot.
🧠 AI Session Capture
Paste any AI conversation (Claude, Copilot, etc.) and Context Restore will:
- Generate a concise summary of what was accomplished
- Build a ready-to-paste resume prompt for your next AI session
- Store the full message history with the snapshot
📤 Export & Share
- Markdown — human-readable handoff document (copied to clipboard)
- JSON — full machine-readable snapshot (saved to file)
- GitHub Gist — public or private Gist with both formats
- Team Share — base64 encoded share string teammates can import
Setup
1. Install the extension
code --install-extension context-restore-0.1.0.vsix
Go to Settings → Extensions → Context Restore:
| Setting |
Purpose |
contextRestore.anthropicApiKey |
AI summarization via Claude |
contextRestore.githubToken |
GitHub Gist export |
contextRestore.autoSnapshotInterval |
Auto-save every N minutes (0 = off) |
contextRestore.maxSnapshots |
Max snapshots to keep (default: 50) |
Or use the ⚙ Settings tab inside the Context Restore sidebar.
Usage
Save a snapshot
- Click $(history) Snapshot in the status bar
- Or:
Ctrl+Shift+S twice (Cmd+Shift+S on Mac)
- Or: Command Palette →
Context Restore: Save Snapshot
Restore a snapshot
- Open the Context Restore sidebar (activity bar icon)
- Click any snapshot → click ↺ Restore
- Or: Command Palette →
Context Restore: Restore Snapshot
Capture an AI conversation
- Copy your conversation from Claude/Copilot (use
You: / Claude: prefix format)
- Open the AI tab in the sidebar
- Select a snapshot to attach it to
- Paste and click ⚡ Summarize with Claude
Resume an AI session
- Select a snapshot that has an AI session
- Click → Resume AI
- The resume prompt is copied to your clipboard — paste it into your AI chat
Export a snapshot
- Open the Export tab
- Select a snapshot
- Choose your format
When pasting conversations, use this format for best results:
You: How do I handle JWT refresh token rotation?
Claude: For stateless JWT at your scale, you should store refresh tokens...
You: What about Redis vs in-memory?
Claude: At ~50k users, in-memory is fine. Redis makes sense when you need...
Supported prefixes: You:, User:, Claude:, Assistant:, AI:
File Structure
.vscode/
context-restore.json ← all snapshots stored here (add to .gitignore if sensitive)
Keyboard Shortcuts
| Shortcut |
Action |
Ctrl+Shift+S × 2 |
Save snapshot |
Privacy
All snapshots are stored locally in .vscode/context-restore.json. Nothing is sent to any server unless you explicitly use the GitHub Gist export or AI summarization feature.
Add .vscode/context-restore.json to your .gitignore if your snapshots contain sensitive content (env variables, API keys in unsaved buffers, etc.).
Contributing
Built with TypeScript + VS Code Webview API. PRs welcome.