Describe the request
Feature / Bug: Please provide a setting to disable Undo Create Diff (mass file wipe / 524288 truncation)
Related: Bug report: mass local file wipe via Undo Create Diff on restart
Request: Product setting to disable / opt out of Undo Create Diff bulk write-back. Current mitigations (timeline.excludeSources, Agent rules) cannot block this path.
Environment
- OS: Windows Server / Win10 build 10.0.14393 (win32)
- Project: large monorepo (API + Web + C++ Qt)
- Local History: kept enabled for recovery (
workbench.localHistory.enabled: true) - Already applied:
timeline.excludeSources: ["timeline.localHistory"]— only hides Timeline UI, does not stop Undo Create Diff
What happened (2026-09-12 ~14:24–14:27 local)
Same failure mode as known “mass wipe via Undo Create Diff”:
| File | Symptom |
|---|---|
packages/api/src/routes/sales.ts |
Truncated to exactly 524288 bytes (half EOF → esbuild Unexpected end of file) |
packages/api/src/routes/delivery-special-price.ts |
Written to 0 bytes → Express Router.use() requires a middleware function but got a Object |
packages/api/src/routes/counter-reconciliation.ts |
Written to 0 bytes |
Recovery: Volume Shadow Copy (HarddiskVolumeShadowCopy17, 14:00) + re-apply intentional edits. Truncated copy kept as sales.ts.truncated-before-restore-*.
Evidence (Local History)
In %APPDATA%\Cursor\User\History\*\entries.json, between 14:26:34 and 14:27:13 local time:
- 809 history entry files updated in ~40 seconds
- All 809 had
source: "Undo Create Diff"(undoCount=809) - Span covered API / web-admin / C++merchant-client / wx-admin / docs / migrations — classic bulk Undo Create Diff, not a single Agent
Writeempty file
This matches prior incidents on the same machine (documented in project rules: 2026-08-16 / 08-22 / 08-23 / 09-09).
Why we need a product switch
We already:
- Forbid Agent empty/
Writeoverwrite of existing sources (workspace rules) - Hide Local History from Timeline to reduce mis-clicks
- Instruct: never use Timeline one-click Undo Create Diff; prefer Checkpoint / per-file restore / VSS / Git
None of these can disable Composer/Agent Review Undo / Undo All or session-restore paths that still emit Undo Create Diff and rewrite disk.
Expected product behavior
Please add one of:
- Setting e.g.
cursor.agent.disableUndoCreateDiff: trueorcursor.composer.bulkUndoDiff: "off"— refuse bulk Undo Create Diff write-back - Or: Undo Create Diff must never write empty / truncated content; fail closed and keep previous bytes
- Or: require explicit typed confirmation for Undo affecting >N files
Also: document that timeline.excludeSources ≠ disabling Undo Create Diff.
Mitigations we added locally (insufficient)
"files.restoreUndoStack": false,
"workbench.restoreEditors": "none"
(plus existing Timeline exclude + Local History kept on)
Does this stop us from using Cursor?
No — but it repeatedly destroys large source files and burns recovery time. We need an official kill-switch.
Paste target: Bug Reports - Cursor - Community Forum (or Feature Requests) → New Topic
Title suggestion: Feature: setting to disable Undo Create Diff (prevents 0-byte / 524288 truncation)