Skip to content

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

Closed

Description

@sunwayru

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

Activity

  1. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for reporting the window-position problem on your dual-monitor Windows setup. In v2, the desktop app uses Electron rather than Tauri and reads the saved position and size before creating the window, retaining coordinates that fit an attached display. v1 now receives only critical fixes; please update the desktop app, or install the v2 CLI with npm i -g @opencode/cli@latest. If window placement still fails on v2, please open a new issue with your version and monitor layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions