anomalyco / anomalyco/opencode
Pasting image is too slow
@kommander is already working on this.
Since Jul 25, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
In opencode when you paste an image it takes around 200ms to read the image and show the image marker in opencode. The time is very noticeable and does not feel like a good experience. This is happening because we are using osascript on mac and powershell on windows which eventually creates a new shell and process and uses the commands to copy image to file then read it. The part where it uses external shell adds about 150ms to the time which is unnecessary because it could be a pre built binary or library which does not have to create shell each time to paste image and will be near instant (like 5ms). Check the video below:
Plugins
none
OpenCode version
1.18.4
Steps to reproduce
- Copy an image in your clipboard
- Paste in opencode
- Observe a 200ms time difference in pasting and image marker showing.
Screenshot and/or share link
I enabled keystroke highlightin in bottom left corner see the button press there and the delay in image marker display
https://github.com/user-attachments/assets/eeceff08-6f8a-432f-a72e-d9141fe5ed37
Operating System
macOS 26.2
Terminal
Kitty (but this is terminal agnostic)
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.