anomalyco / anomalyco/opencode
Mouse locks randomly while sessions are being processed
@Hona is already working on this.
Since Aug 26, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Environment
- OpenCode Desktop 1.18.22 (Windows 11, single 1920×1080 display, 100% scaling)
Symptom
While the app runs, the OS cursor becomes confined to a fixed rectangle
every ~33 seconds (later bursts every few seconds). The rectangle is
roughly L=22 T=90 R=1302 B=810 (≈1280×720 outer, L=27 T=95 R=1297 B=805 inner).
The cursor can type and interact in the lower‑right “bar” area only,
because that’s the last place I click.
Evidence
- Watched cursor for 2 h (2 Hz polling). Clip events recur exactly to those two rectangles, alternating by 5 px border. Log available on request.
- Controlled test: suspended all 7 OpenCode processes via
NtSuspendProcessfor 20 seconds → zero clip events. On resume, clipping resumed immediately. This proves the confinement is caused by OpenCode Desktop itself. - Eliminated every other suspect by terminating them during active clipping (iCUE, Chrome, Edge, Voicemod, Adobe CC, Ollama, media apps, etc.). Clipping continued in every case.
Expected behavior
App should never call ClipCursor outside explicit user‑initiated pointer‑lock, and must release confinement when its UI state changes.
Workaround
A background watchdog that calls GetClipCursor at 2 Hz and resets to full‑screen bounds restores normal cursor movement instantly.
Frequency note
Initially ~every 33 s; later bursts up to ~10 clips/5 s. Correlates with the IDE panel being open.
Attribution
- OS: Windows 11 (version 10.0, build 22621)
- CPU: Intel i7‑13700K
- GPU: NVIDIA RTX 4080 (driver 560.XX)
- OpenCode Desktop: 1.18.22 (embedded Electron, stored at
%APPDATA%\ai.opencode.desktop\)
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
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.