anomalyco / anomalyco/opencode

Desktop freezes or crashes when pasting large text into the prompt input

Open
#47,425 1 comment 2 reactions 1 assignee View on GitHub

@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

  1. Download the attached large text file, which contains approximately 150,000 repetitions of the character 1.
  2. Open the file and copy all of its content.
  3. Open OpenCode Desktop on Windows.
  4. Paste the copied content directly into the prompt input.
  5. Observe that the application crashes.

The issue can also be observed in a real-world scenario:

  1. Open a Spring Boot project in IntelliJ IDEA on Windows.
  2. Run the project until a runtime error occurs.
  3. Copy the error logs from the Run console.
  4. 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

  1. Download the attached large-paste-test.txt file.
  2. Open the file and copy all of its content.
  3. Open OpenCode Desktop on Windows.
  4. Paste the copied content directly into the prompt input.
  5. Observe the application behavior.

The attached file contains approximately 140,000 characters. It consistently reproduces the crash in my environment.

large-paste-test.txt

Screenshot and/or share link
Image
Operating System

Windows10

Terminal

No response

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.