anomalyco / anomalyco/opencode
Desktop (Windows): composer loses keyboard focus when switching session tabs
Open
@Hona is already working on this.
Since Aug 22, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
In OpenCode Desktop on Windows, the prompt composer loses keyboard focus whenever I switch between open session tabs. After returning to a tab, keystrokes go nowhere until I click into the composer manually.
This makes multi-session workflows painful: every tab switch costs an extra mouse click before typing is possible.
Related reports:
- #40866 — Desktop input fields lose focus (dialog form fields; different UI area)
- #44243 — my feature request that Escape focus the prompt input field; this bug is part of why such a recovery shortcut matters
- #30887 — my earlier request for the same Esc-to-focus behavior, closed as not planned
Steps to reproduce
- Open OpenCode Desktop on Windows.
- Open two or more sessions so multiple session tabs exist.
- Type in the composer of one tab.
- Switch to another tab and then back again.
- Observe that the composer does not have keyboard focus; typed characters are not entered anywhere.
Expected behavior
The composer regains keyboard focus automatically when returning to a session tab.
Actual behavior
Focus is dropped on tab switch; manual mouse click into the composer is required before typing works again.
Environment
- App: OpenCode Desktop 1.18.21
- OS: Microsoft Windows 11 Education, 25H2, build 26200.8875
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.