You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
desktop: composer loses input focus after every agent turn; must close panel and reopen chat to type #57176
In the OpenCode desktop app (Windows), after the agent finishes a turn, keyboard focus does not return to the message composer. The user must manually close a panel (X button) and reopen the chat tab to be able to type again. This happens on every turn and on all session tabs, so writing follow-up messages requires constant manual focus recovery.
Environment
opencode version: desktop app reports 2.0.24 (app runtime). Note: opencode --version on PATH returns 1.18.32 — that is the V1 npm CLI (opencode-ai), not the desktop client.
OS: Windows_NT 10.0.26200 (Windows 11, win32 x64)
Terminal: Unavailable — OpenCode Desktop GUI app, not a terminal emulator
Shell: C:\WINDOWS\system32\cmd.exe (COMSPEC); PowerShell is used for shell tool calls
Install/channel: desktop release
Active plugins: none found (no opencode.json / ~/.config/opencode config present)
Reproduction
Open OpenCode desktop app on Windows.
Send a prompt to the agent; agent replies (with shell tool calls and panels opening during the turn).
When the reply finishes, immediately start typing without clicking anywhere first.
Keyboard input does not reach the composer. The user must close a panel with the X button and return to the chat — in every session tab, after every turn.
Expected Behavior
When the agent's turn completes, focus should return to the message composer so the user can type the next message immediately.
Actual Behavior
Focus stays with whatever panel/browser tab had it during the turn (e.g., the Review pane / browser panel). The composer does not receive keyboard input until the user manually closes a panel and re-opens the chat tab. Reproducible consistently on every agent turn, affects all session tabs.
Additional Context
Workarounds the user found: manually clicking into the composer or closing/reopening the panel — both work but must be done after every single turn, which makes the app painful to use.
opencode service status was attempted but the opencode binary on PATH resolves to the V1 npm package, so service diagnostics for the desktop build were unavailable from the CLI.
Client-side logs (~/.local/share/opencode/log/opencode.log) contain no focus-related errors, only benign entries (worktree discovery on a non-git directory, InterruptError noise at shutdown).
Willing to provide additional diagnostics (debug build/verbose logs) if needed.
Thanks for the detailed report! This only happens in the desktop app on Windows, and our automated environment can't run either, so I couldn't try to reproduce it. It needs a maintainer who can test the desktop app.
It does look like a bug, not intended behaviour: the code is meant to stop agent browser activity from taking your keyboard focus.
It would help to know:
Does it happen after turns that only run shell commands, with no browser or Review pane opening? Or only when the agent uses the browser or opens the Review pane?
Does it still happen on the latest desktop release?
Additional symptoms from the same user (same environment):
Clicking directly into the composer does not restore input either.
While this happens, the whole UI appears frozen: dragging the mouse over the transcript paints a full text selection (blue selection over all text), keyboard input is ignored ("everything hangs").
This is not limited to a single tab; it happens session-wide.
This looks like the renderer main thread stalling rather than a pure focus bug. The affected session has a very long transcript with long markdown replies (large tables, emoji, Cyrillic text). Trigger may be transcript/rendering performance in long sessions.
Activity
opencode-agent commentedon Oct 19, 2026
Thanks for the detailed report! This only happens in the desktop app on Windows, and our automated environment can't run either, so I couldn't try to reproduce it. It needs a maintainer who can test the desktop app.
It does look like a bug, not intended behaviour: the code is meant to stop agent browser activity from taking your keyboard focus.
It would help to know:
Related issues:
Matilda2131 commentedon Oct 19, 2026
Additional symptoms from the same user (same environment):
This looks like the renderer main thread stalling rather than a pure focus bug. The affected session has a very long transcript with long markdown replies (large tables, emoji, Cyrillic text). Trigger may be transcript/rendering performance in long sessions.