Repository navigation
Description
Bug Description
The desktop app never remembers how big I've made the window or where I put it. Every time it launches it snaps back to the same default size. It's most noticeable right after an update, since that's when it restarts, but it happens on any restart. All my other settings stick fine — just not the window size or position.
Steps to Reproduce
- Open the Hermes desktop app.
- Resize the window (or move/maximize it).
- Quit the app, or let an update restart it.
- Reopen — the window is back to the default size/position, ignoring the last change.
Expected Behavior
The window reopens at whatever size and position it was last left at, like a normal desktop app.
Actual Behavior
It always reopens at the default size and position, ignoring the last resize/move. No error or crash — the window state just isn't saved.
Affected Component
Configuration (config.yaml, .env, hermes setup)
Messaging Platform (if gateway-related)
No response
Debug Report
This is a UI / window-geometry bug with no runtime error or relevant logs, so `hermes debug share` output isn't applicable here. Happy to provide a debug share on request. Environment: desktop shell 0.15.1, agent 0.16.0, commit 58ad694 (current as of 2026-06-18), Windows 11.Operating System
Windows 11
Python Version
No response
Hermes Version
Desktop shell 0.15.1, agent 0.16.0 (commit 58ad694, current as of 2026-06-18)
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
In apps/desktop/electron/main.cjs, createWindow() builds the main BrowserWindow with hardcoded width: 1220, height: 800 and there's no bounds persistence anywhere: no getBounds/setBounds save/restore, no resize/move/close listeners, and no window-bounds file written to userData. getWindowState() only tracks fullscreen + native overlay width, not size/position. App settings persist because they write their own JSON files under app.getPath('userData') (e.g. connection.json, native-theme.json); window geometry was simply never wired into that, so every launch falls back to the hardcoded default.
Proposed Fix (optional)
Persist the main window's bounds to a JSON file under app.getPath('userData') on resize/move/close (debounced) and restore them in createWindow(), falling back to the current 1220x800 default when the file is missing or the saved bounds are off-screen. The electron-window-state package handles the off-screen/multi-monitor validation if you'd rather not hand-roll it. The session windows created elsewhere in main.cjs could get the same treatment if per-window memory is wanted.
Are you willing to submit a PR for this?
- I'd like to fix this myself and submit a PR
Activity
alt-glitch commentedon Jun 18, 2026
Duplicate of #39101 — same bug: the desktop main window's bounds are never persisted (createWindow() in apps/desktop/electron/main.cjs hardcodes 1220x800 with no getBounds/setBounds save/restore), so it always reopens at the default size/position. Tracking under #39101; see also the feature-request framing in #38830.
teknium1 commentedon Jul 14, 2026
Implemented on main.
Automated hermes-sweeper review verified that the requested desktop geometry persistence is already shipped.
apps/desktop/electron/main.ts:2003reads and sanitizeswindow-state.json;:2014persists normal bounds and maximized state.apps/desktop/electron/main.ts:7232restores saved bounds at main-window creation;:7279restores maximization.apps/desktop/electron/main.ts:7296–:7300saves resize/move/maximize changes and flushes on close.apps/desktop/electron/window-state.ts:78–:111rejects off-screen positions and clamps restored dimensions to available displays.2de7549fe0fe06954dd7b72528ca37953d62ada1and is included inv2026.7.1.This also matches the duplicate discussion linking #39101 and the already-closed #38830.