anomalyco / anomalyco/opencode

SIGILL crash after screen unlock — mouse coordinates written to terminal

Open
#49,002 0 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 14, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

opencode crashes with SIGILL after the screen wakes from lock. It works fine at startup but fails after being idle. Before crashing, moving the mouse over the opencode window causes cursor coordinates to be printed to the terminal — looks like mouse escape sequences are getting through and corrupting the buffer.

Running inside tmux with mouse on, foot terminal, Hyprland.

Version: 1.18.30
OS: Omarchy 4.0.3 (Arch Linux), kernel 7.2.3, AMD Ryzen 7 7800X3D
Terminal: foot, inside tmux (mouse enabled)

Steps to reproduce:

  1. Run opencode --auto inside tmux (mouse on) inside foot terminal
  2. Leave idle until screen lock activates (~5 min)
  3. Unlock screen and resume
  4. Crash with SIGILL

No crash on fresh start, only after wake from lock.

Technical detail: The crash is at offset 0x2407064 which contains a ud2 instruction (unreachable-code assertion) inside napi_acquire_threadsafe_function. Similar to #38986 but our CPU has AVX-512, and the trigger is screen unlock + mouse events rather than startup.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.