StateSense
Never lose a good version to a bad AI refactor.
StateSense auto-snapshots your VS Code workspace as you code. Preview changes, compare versions, and restore any state -- all before you git commit.
Built for developers using GitHub Copilot, Cursor, Windsurf, Claude, and ChatGPT.
The problem
You ask Copilot to refactor your auth module. It rewrites 14 files. Half of it is wrong.
Ctrl+Z only undoes the last file you had open. Git has nothing to show -- you haven't committed. Stash loses context when you branch-hop. There's no safety net for the messy middle.
The solution
StateSense snapshots your entire working state automatically, every time you pause. No commands. No branches. No stashing.
If the AI goes sideways, pick a snapshot from minutes ago and restore every file -- instantly.
How to use it
Before a big AI prompt:
- Click Create Snapshot in the StateSense panel
- Rename it:
"Before AI auth refactor"
- Send your prompt
After the AI breaks things:
- Click your named snapshot
- Restore Preview shows every file that will change -- review the diffs
- Click Confirm -- entire workspace restored instantly
Features
|
Free |
Pro |
| Auto-snapshots |
Yes |
Yes |
| Manual snapshots |
Yes |
Yes |
| Visual diffs |
Yes |
Yes |
| Restore Preview panel |
Yes |
Yes |
| Git-aware cleanup |
Yes |
Yes |
| Local storage only |
Yes |
Yes |
| Active snapshots |
7 |
Unlimited |
| Pin checkpoints |
- |
Yes |
| Rename snapshots |
- |
Yes |
Upgrade to Pro -- $6/year or $19 lifetime
Key behaviours
Auto-snapshot triggers:
- Multi-file edits (2+ files changed together)
- File creation or deletion
- Single-file edits where 10+ lines changed from the previous snapshot
- 5 minutes of idle time (periodic backup)
Git-aware cleanup:
- All snapshots (including pinned) are cleared on every commit and branch switch
- This is intentional -- branch-A history should not pollute branch-B
- Pin only protects against the manual Clear Snapshots command
Incremental storage:
- Each snapshot stores only files that changed since the previous one
- Tiny footprint -- a full session history typically fits in a few MB
- Stored in VS Code globalStorageUri -- never inside your repo, impossible to commit
Commands
| Command |
Description |
StateSense: Create Snapshot |
Manually create a snapshot now |
StateSense: Preview Snapshot |
View what changed in a snapshot vs the previous one |
StateSense: Restore Snapshot |
Open Restore Preview -- review all file changes, then confirm |
StateSense: Pin Snapshot |
Protect a snapshot from manual clears (Pro) |
StateSense: Rename Snapshot |
Give a snapshot a custom name (Pro) |
StateSense: Clear All Snapshots |
Remove all (pinned snapshots and their chain are kept) |
Configuration
{
"statesense.autoSnapshot.enabled": true,
"statesense.autoSnapshot.largeChangeThreshold": 500,
"statesense.autoSnapshot.multiFileThreshold": 3,
"statesense.autoSnapshot.fastChangeWindow": 5000,
"statesense.autoSnapshot.idleInterval": 300000
}
Privacy
- 100% local -- snapshots never leave your machine
- No account, no telemetry, no network calls
- Stored in VS Code global storage, outside your workspace
Links