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
Opencode freezes when pressing option + left arrow key on MacBook with high CPU usage #2688
Just ran into the same issue since v0.13.4 (see #2854) but also noticed that it only had this issue with Ghostty (1.2.0). Will close my other issue and follow this one for a solution 🤞
I've traced the root cause of this issue to the @opentui/core package's stdin buffer handling.
Root Cause
In packages/core/src/lib/stdin-buffer.ts, the isCompleteSequence function doesn't handle double-escape sequences (like \x1b\x1b[D for Option+Left). When the terminal sends this sequence:
The function sees it starts with ESC (\x1b)
afterEsc = \x1b[D (starts with ESC, not [)
None of the pattern checks match
Falls through to return "complete" - treating \x1b\x1b as complete
The remaining [D is emitted as literal text
This is why users see [D or [C printed instead of cursor movement.
Activity
rekram1-node commentedon Sep 19, 2025
That's weird I can replicate, this may be fixed once opentui migration is complete
aemr3 commentedon Sep 19, 2025
yes I have experienced it as well, I'm using shift + arrow keys without any problems.
lloydrichards commentedon Sep 29, 2025
Just ran into the same issue since v0.13.4 (see #2854) but also noticed that it only had this issue with Ghostty (1.2.0). Will close my other issue and follow this one for a solution 🤞
lloydrichards commentedon Oct 1, 2025
in v0.13.7, I'm no longer having this issue
towry commentedon Oct 24, 2025
pedropombeiro commentedon Feb 7, 2026
I've traced the root cause of this issue to the
@opentui/corepackage's stdin buffer handling.Root Cause
In
packages/core/src/lib/stdin-buffer.ts, theisCompleteSequencefunction doesn't handle double-escape sequences (like\x1b\x1b[Dfor Option+Left). When the terminal sends this sequence:\x1b)afterEsc=\x1b[D(starts with ESC, not[)return "complete"- treating\x1b\x1bas complete[Dis emitted as literal textThis is why users see
[Dor[Cprinted instead of cursor movement.Filed Upstream
I've filed an issue with a proposed fix in the opentui repo:
anomalyco/opentui#644
github-actions commentedon Apr 9, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.