StateSense

Auto-Snapshots

How StateSense decides when to snapshot automatically.

StateSense monitors your workspace using VS Code's file system watcher. Instead of snapshotting every save (like Local History does), it waits for meaningful change thresholds to be crossed before creating a snapshot.

Snapshot triggers

Large aggregate changestatesense.autoSnapshot.largeChangeThreshold

Total lines changed across all files in the debounce window reaches 500+ (configurable). Files with fewer than 10 changed lines are filtered out before this count.

Multi-file changestatesense.autoSnapshot.multiFileThreshold

3+ distinct files modified within the same debounce window (configurable).

File created

A new file is added to the workspace.

File deleted

An existing tracked file is removed from the workspace.

Fast-change windowstatesense.autoSnapshot.fastChangeWindow

Many rapid changes detected in quick succession — typical of AI tools generating code. Window size is configurable.

Idle timerstatesense.autoSnapshot.idleInterval

The workspace has had changes since the last snapshot and has been idle for the configured interval (default: 5 minutes).

Debouncing

All change events are debounced over a fixed 10-second window. This means rapid successive changes — like an AI tool editing files — are grouped into one snapshot instead of creating hundreds.

Disabling auto-snapshots

Set statesense.autoSnapshot.enabled to false to disable automatic snapshots. You can still create snapshots manually at any time.

→ Settings reference→ How to restore