anomalyco / anomalyco/opencode

Window position/size settings are not saved on multi-monitor setup (Tauri window state bug)

Open
#47,534 0 comments 0 reactions 1 assignee View on GitHub

@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
  1. Use a dual-monitor setup (Laptop + external display, with the external display set as primary).
  2. Open OpenCode, move it to the left half of the external monitor, and close the app.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.