Skip to content

Bug Report: Local DoS / Persistent Crash Loop via Large/Binary File Upload #37814

Description

@Kymshay

App persistence crash loop (OOM) when uploading large text/binary files into the chat.

Description

When attempting to upload or paste a massive text file (example, ~4 million characters, containing raw binary and encrypted data from a Burp Suite log) into the chat, the application crashes instantly due to an Out of Memory (OOM) error.

The core issue is that this massive payload is persistently saved directly into opencode.global.dat. This triggers a permanent crash loop: every time the application is restarted, it attempts to load and render the corrupt/massive state from the .dat file, freezing the main thread and rendering the chat completely unusable until opencode.global.dat is manually deleted by the user.

Expected Behavior:
The application should sanitize inputs by enforcing a strict maximum character/file size limit on the chat buffer. Furthermore, it should validate payloads before committing them to the global state file. If a message fails to parse, the app should discard it or throw a handled exception rather than corrupting the persistence layer and breaking the app on subsequent launches.

Logs:

Exception Code: 0xe0000008 (V8 Engine / Chromium Out of Memory)

Faulting Module: KERNELBASE!RaiseException

Temporary Workaround:
Manually deleting \AppData\Roaming\ai.opencode.desktop\opencode.global.dat restores app functionality but wipes local chat history.

Plugins

opencode-browser

OpenCode version

v1.18.3

Steps to reproduce

Open the OpenCode chat interface.

Upload or paste a very large text payload (~4M characters) containing mixed raw binary/hex data.

Observe the immediate application crash.

Relaunch the application and attempt to send a message or interact with the chat. (The UI/chat process remains frozen in the background).

Screenshot and/or share link

https://pastebin.com/tUDEN3PU

Operating System

Windows 10 (x64)

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions