anomalyco / anomalyco/opencode
Window position/size settings are not saved on multi-monitor setup (Tauri window state bug)
@Hona is already working on this.
Since Sep 5, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Description
The desktop application does not remember its size and position on a multi-monitor setup. On every launch, it ignores the saved coordinates in .window-state.json and opens on the wrong display or expands beyond the monitor screen boundaries.
This appears to be a known initialization race condition with tauri-plugin-window-state where the window initializes before reading the config.
Steps to Reproduce
- Use a dual-monitor setup (Laptop + external display, with the external display set as primary).
- Open OpenCode, move it to the left half of the external monitor, and close the app.
- Reopen the app.
Expected Behavior
The window should accurately restore its position on the left half of the external monitor according to the .window-state.json file.
Actual Behavior
The application ignores the config (even if set to Read-only), resets isMaximized flags arbitrarily, and opens on the laptop screen or randomly across monitors.
Environment
- OS: Windows 11
- App Version: Latest Desktop Release (Tauri-based)
- Monitor Setup: Dual-monitor (External Primary + Laptop Secondary)
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.