Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Files are being automatically reverted to previous versions after changes are accepted in the IDE. The file appears correct in the editor view, but when code is executed, it fails because the actual file on disk has been reverted to an older version. This causes code breakage, data loss, and requires manual restoration of changes.
Specific Example:
- Modified
trident/src/trident/marketdata/beam_watch.pywith upgraded implementation (223 lines) - Accepted changes in IDE - file appeared correct
- Ran
python scripts/run_hl_realtime_3m_ha.py - Received error:
TypeError: BeamWatch.__init__() got an unexpected keyword argument 'momentum_threshold' - Checked file on disk - had reverted to old version (142 lines, missing new parameters)
Steps to Reproduce
- Open a file in Cursor IDE (e.g.,
trident/src/trident/marketdata/beam_watch.py) - Make significant changes to the file (add new methods, parameters, or substantial code)
- Accept the changes in the IDE (file shows as updated in editor)
- Verify the file appears correct when viewed in the editor
- Run code that depends on the changes (e.g.,
python scripts/run_hl_realtime_3m_ha.py) - Observe failure due to missing changes
- Check the actual file on disk - changes are gone, file has reverted to previous version
Note: This has occurred multiple times during development sessions, particularly when making substantial changes to files.
Expected Behavior
- Files should persist all changes after being accepted in the IDE
- No automatic reversion should occur
- The file content on disk should match what is displayed in the IDE editor
- Git status should accurately reflect file state
- If a file cannot be saved, the IDE should show an error or warning
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Important: Accessing the workspace via SSH into Windows server environment. This may be relevant to file persistence/sync issues.
Version: 2.3.21
VSCode Version: 1.105.1
Commit: 68e0a0385b87408d050869ea543e3778ad53f780
Date: 2026-01-02T23:46:13.381Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.0.0
For AI issues: which model did you use?
Auto (Sonnet 4) - This issue occurs regardless of AI model used, as it’s a file persistence problem
For AI issues: add Request ID with privacy disabled
[Not applicable - this is a file system/IDE issue, not an AI generation issue]
Additional Information
File in Question:
- Path:
trident/src/trident/marketdata/beam_watch.py - Expected after changes: 223 lines with momentum tracking, proper BREAK detection
- Actual after reversion: 142 lines, old implementation
Key Changes Lost:
- Missing
momentum_thresholdandmomentum_window_msparameters - Missing
_post_breaktracking dictionary - Missing
_maybe_emit_momentum()method - Missing
infofield inBeamEventdataclass - Using
now_ms()instead of tickts_msfor timing
Git Status:
- Repository shows “working tree clean” even when file is incorrect
- No uncommitted changes detected
- File appears to be in sync with last commit, but content doesn’t match IDE view
Workspace Configuration:
- Multiple workspace paths:
C:\TRIDENT_ZEROand/trident - Active Git repository on
developbranch - PowerShell 5.1 shell
Pattern Observed:
- Changes appear accepted in IDE but don’t persist to disk
- No warning or notification when reversion occurs
- File appears correct in editor but actual disk content differs
- This has happened multiple times during the session
- User has resorted to “aggressively committing” changes immediately to prevent loss
Workaround:
- Manually re-apply changes after each reversion
- Immediately commit changes after making them
- Verify file content on disk matches IDE view before running code
Potential Root Causes to Investigate:
- File watcher or sync process reverting files
- Multiple workspace paths causing sync conflicts
- Git hook or auto-format process interfering
- IDE file caching vs actual disk state mismatch
- Background processes restoring files
- Can still use Cursor for development, but must work around the issue
- Requires constant vigilance and immediate commits
- Causes significant productivity loss and confusion
- Risk of losing work if not caught immediately
- Makes development workflow unreliable
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor