OpenCode v1.2.21: Windows Fixes & Desktop UX

v1.2.21 brings critical Windows Git path fixes, PTY memory leak patches, and desktop UX polish including sidebar animations and better empty states.

OpenCode v1.2.21: Windows Fixes & Desktop UX

TL;DR

  • Fixed Git path resolution on Windows (Git Bash, MSYS2, Cygwin)
  • PTY session handle leak patched; file tree tabs now persist on reopen
  • Desktop UX improvements: sidebar animations, better empty states, Safari autocorrect handling

New

  • Project git init API — programmatic Git initialization for projects
  • Interactive timeline visualization — new timeline component in desktop app
  • Sidebar reveal animation & hover peek — improved navigation UX with smoother transitions
  • Auto-accept keybind — now works regardless of permission config

Fixed

  • Git path resolution on Windows — Git Bash, MSYS2, and Cygwin paths now resolve correctly for modified files
  • PTY session handle leak — memory leak in PTY sessions eliminated
  • File tree tab persistence — tabs now preserve state on reopen
  • Line ending preservation — edit tool now maintains original line endings
  • TUI /export toggle — broken export command in TUI fixed
  • File scrolling in app — resolved scrolling issue in file browser
  • Portal positioning — sidebar menus and tooltips now position correctly
  • Safari autocorrect — enabled in normal mode, disabled in shell mode for better UX
  • Session header guard — prevents undefined errors when options are empty
  • Preview database filenames — sanitized to prevent conflicts

Improved

  • Share load performance — faster workspace share loads
  • Model persistence — selected model now sticks to session after changes
  • New session defaults — uses agent model/variant from previous session
  • Empty states — better review and file tree empty state messaging
  • Schema validation logging — stack traces now logged on validation failures

Update with: npm install opencode@1.2.21 or check the release page for platform-specific instructions.

Source: OpenCode