anomalyco / anomalyco/opencode
Desktop freezes or crashes when pasting large text into the prompt input
@Hona is already working on this.
Since Sep 5, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Bug description
The OpenCode desktop app crashes immediately when a large amount of text is pasted directly into the prompt input on Windows.
Context
I first encountered this issue while developing a Spring Boot project. After the project failed at runtime, I copied the error logs from IntelliJ IDEA and pasted them directly into OpenCode to ask for help analyzing the problem. The application crashed immediately after pasting the logs.
I then performed controlled tests using plain-text files containing only the character 1:
- Around 50,000 characters: significant UI lag
- Around 150,000 characters: consistently triggers an out-of-memory crash
Reproduction steps
- Download the attached large text file, which contains approximately 150,000 repetitions of the character
1. - Open the file and copy all of its content.
- Open OpenCode Desktop on Windows.
- Paste the copied content directly into the prompt input.
- Observe that the application crashes.
The issue can also be observed in a real-world scenario:
- Open a Spring Boot project in IntelliJ IDEA on Windows.
- Run the project until a runtime error occurs.
- Copy the error logs from the Run console.
- Paste the logs directly into the OpenCode desktop prompt input.
Observed behavior
- Pasting around 50,000 characters causes significant UI lag.
- Pasting around 150,000 characters consistently triggers an out-of-memory crash.
- In the original scenario, pasting Spring Boot runtime error logs caused an immediate crash.
Expected behavior
Large pasted content should not crash or block the application. It could be automatically converted into a .txt attachment or handled through another non-blocking mechanism.
Environment
- OS: Windows 10
- App: OpenCode Desktop 1.18.27
- Source of text: IntelliJ IDEA Spring Boot runtime error logs
- Controlled test input: approximately 150,000 repetitions of the character
1
Plugins
No response
OpenCode version
1.18.27
Steps to reproduce
Reproduction steps
- Download the attached
large-paste-test.txtfile. - Open the file and copy all of its content.
- Open OpenCode Desktop on Windows.
- Paste the copied content directly into the prompt input.
- Observe the application behavior.
The attached file contains approximately 140,000 characters. It consistently reproduces the crash in my environment.
Screenshot and/or share link
Operating System
Windows10
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.