[BUG] TUI session_diff tracking not working on Windows - files remain empty #7652

Open
opened 2026-02-16 18:07:50 -05:00 by yindo · 2 comments
Owner

Originally created by @aalisherr on GitHub (Jan 26, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Description

The TUI version's session_diff tracking isn't capturing file changes on Windows 11. All session_diff/*.json files remain [] despite successful file modifications via agents.

Environment

  • OpenCode version: 1.1.36
  • Platform: Windows 11
  • oh-my-opencode: 3.1.0
  • Shell: Git Bash/MSYS

Evidence

# Files created successfully
$ ls test.txt
-rw-r--r-- 1 bou-hp 5 Jan 26 18:43 test.txt

# But session_diff is empty
$ cat ~/.local/share/opencode/storage/session_diff/ses_40a39f933ffeoP8806D19v2ma5.json
[]

### Plugins

oh-my-opencode

### OpenCode version

1.1.36

### Reproduction
Start opencode in TUI mode on Windows
Ask agent to create/modify files
Check ~/.local/share/opencode/storage/session_diff/<session-id>.json
Result: File is [] instead of containing diffs
Expected
session_diff/*.json should contain file change records like:

[
  {
    "path": "test.txt",
    "type": "create",
    "content": "..."
  }
]

Review changes are always empty in cli and desktop, made git init, tried to reinstall opencode but nothing helps. <img width="733" height="892" alt="Image" src="https://github.com/user-attachments/assets/23e6dd4a-d09c-4115-b51b-eade87111a75" />
Originally created by @aalisherr on GitHub (Jan 26, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description ## Description The TUI version's session_diff tracking isn't capturing file changes on Windows 11. All `session_diff/*.json` files remain `[]` despite successful file modifications via agents. ## Environment - OpenCode version: 1.1.36 - Platform: Windows 11 - oh-my-opencode: 3.1.0 - Shell: Git Bash/MSYS ## Evidence ```bash # Files created successfully $ ls test.txt -rw-r--r-- 1 bou-hp 5 Jan 26 18:43 test.txt # But session_diff is empty $ cat ~/.local/share/opencode/storage/session_diff/ses_40a39f933ffeoP8806D19v2ma5.json [] ### Plugins oh-my-opencode ### OpenCode version 1.1.36 ### Reproduction Start opencode in TUI mode on Windows Ask agent to create/modify files Check ~/.local/share/opencode/storage/session_diff/<session-id>.json Result: File is [] instead of containing diffs Expected session_diff/*.json should contain file change records like: [ { "path": "test.txt", "type": "create", "content": "..." } ] Review changes are always empty in cli and desktop, made git init, tried to reinstall opencode but nothing helps. <img width="733" height="892" alt="Image" src="https://github.com/user-attachments/assets/23e6dd4a-d09c-4115-b51b-eade87111a75" />
yindo added the windowsbug labels 2026-02-16 18:07:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 26, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #3563: EBADF: bad file descriptor - Windows 11 (Windows-specific file handling issues)
  • #5840: [Tracking] Edit tool reliability: "modified since last read" errors (Undo/Redo & Persistence) (file change tracking issues)
  • #6140: Edit tool diff shows file changed, but actually doesn't (file change detection reliability)
  • #10589: [BUG] [CRITICAL] Snapshot .nothrow() causes silent data loss (Windows file snapshot tracking failure)

The most closely related is #10589, which describes a Windows-specific bug where git operations fail to track file changes in snapshots. Your session_diff tracking issue may be related to similar file tracking/state persistence problems on Windows.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 26, 2026): This issue might be a duplicate of existing issues. Please check: - #3563: EBADF: bad file descriptor - Windows 11 (Windows-specific file handling issues) - #5840: [Tracking] Edit tool reliability: "modified since last read" errors (Undo/Redo & Persistence) (file change tracking issues) - #6140: Edit tool diff shows file changed, but actually doesn't (file change detection reliability) - #10589: [BUG] [CRITICAL] Snapshot `.nothrow()` causes silent data loss (Windows file snapshot tracking failure) The most closely related is #10589, which describes a Windows-specific bug where git operations fail to track file changes in snapshots. Your session_diff tracking issue may be related to similar file tracking/state persistence problems on Windows. Feel free to ignore if none of these address your specific case.
Author
Owner

@pschiel commented on GitHub (Jan 28, 2026):

possibly fixed in #6763 due to path mismatches in session/index.ts, project.ts, instance.ts, patch/index.ts or a combination of them

@pschiel commented on GitHub (Jan 28, 2026): possibly fixed in #6763 due to path mismatches in `session/index.ts`, `project.ts`, `instance.ts`, `patch/index.ts` or a combination of them
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7652