opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Very slow typing on mac

Open Forbu opened this issue 1 year ago • 35 comments

Hello everyone,

I'm using opencode on my mac. My keyboard is functioning normally most of the time. But when using opencode i frequently miss some key type (I type some key and those are not showing in the opencode terminal).

Forbu avatar Jun 20 '25 17:06 Forbu

which terminal app do you use? any multiplexers (tmux, zellig)? which shell?

adamdotdevin avatar Jun 20 '25 17:06 adamdotdevin

I'm experiencing the same thing with bash in wezterm without a multiplexer. Roughly 25% of keypresses are dropped. It works fine in the builtin Terminal app.

sangaline avatar Jun 20 '25 17:06 sangaline

Try changing themes. The default theme did that same thing for me, changing to a dark theme works.

clockmike avatar Jun 20 '25 18:06 clockmike

which terminal app do you use? any multiplexers (tmux, zellig)? which shell?

the default mac terminal

Forbu avatar Jun 20 '25 18:06 Forbu

Ok I just reopen the app : it is working fine now

Forbu avatar Jun 20 '25 18:06 Forbu

I had this when i first installed opencode for the first 5 ish min, then it fixed itself. Running ghostty on default theme. Wondering if there is a first time setup stuff running in the background that is degrading performance?

0ximjosh avatar Jun 20 '25 20:06 0ximjosh

oh, interesting… has anyone in this thread not seen the issue resolve itself over time?

adamdotdevin avatar Jun 20 '25 20:06 adamdotdevin

I can also confirm that it was very laggy, dropping keypresses on first install, but hasn't experienced that since.

I also used Ghostty, with no multiplexer, fish shell if that matters on macOS.

I very much though my keyboard was broken for a moment. :)

mattrobenolt avatar Jun 20 '25 20:06 mattrobenolt

I think I had the same thing, also resolved itself. I'm using Alacritty and accessing opencode via tmux.

johnsaigle avatar Jun 20 '25 20:06 johnsaigle

Had the a similar experience as @0ximjosh. Ghostty, MacOS, default theme, was laggy for the first minute or so and dropping ~40% of keystrokes. After I quite and started it up again it worked fine.

user-0a avatar Jun 21 '25 04:06 user-0a

very buggy for me on Terminal.app and iTerm.app, I tried restarting multiple times. Keys are dropped and commands not appearing to register. Tried /new a few times and API dashboard said I made 2.5k requests.

sanderjson avatar Jun 21 '25 19:06 sanderjson

very buggy for me on Terminal.app and iTerm.app, I tried restarting multiple times. Keys are dropped and commands not appearing to register. Tried /new a few times and API dashboard said I made 2.5k requests.

what other commands were you trying? /new doesn't make any network requests at all, just clears the active session.

adamdotdevin avatar Jun 21 '25 19:06 adamdotdevin

Im wondering if it could be related to the tui being a subprocess (from my understanding of the way opencode is built) of bun? https://github.com/oven-sh/bun/issues/9855 Not sure that explains why it only is slow the first time though

0ximjosh avatar Jun 21 '25 20:06 0ximjosh

very buggy for me on Terminal.app and iTerm.app, I tried restarting multiple times. Keys are dropped and commands not appearing to register. Tried /new a few times and API dashboard said I made 2.5k requests.

what other commands were you trying? /new doesn't make any network requests at all, just clears the active session.

Yeah thanks, that was a bit inaccurate. I got /new to work once then DID get to pass a prompt "Create static website with latest PixiJS" (or similar), it showed a few things in the terminal but no code was written. I was confused so created new folders and kept trying with /new but couldn't get it to work. I did get the model to set correctly with /model (felt buggy, like very slow). I also tried with /session — I think I was a bit confused session vs new. I assumed session was for managing multiple instances?

Maybe I can record a Loom of my experience, let me know if that might help.

sanderjson avatar Jun 23 '25 06:06 sanderjson

that would be great!

adamdotdevin avatar Jun 23 '25 11:06 adamdotdevin

people who experienced the issue, what was the install method?

thdxr avatar Jun 24 '25 00:06 thdxr

also if you can make this happen can you send me the latest log in ~/.local/share/opencode/log

thdxr avatar Jun 24 '25 00:06 thdxr

people who experienced the issue, what was the install method?

Homebrew.

mattrobenolt avatar Jun 24 '25 00:06 mattrobenolt

lol i wonder if our brew auto upgrade is hitting that thing where it upgrades your whole system. let me check

thdxr avatar Jun 24 '25 00:06 thdxr

fwiw I'd find that unlikely to be an interraction, I basically use homebrew for everything, it's just the habit I have, and I very feverishly do $ brew update && brew outdated && brew upgrade at least daily.

mattrobenolt avatar Jun 24 '25 00:06 mattrobenolt