Skip to content

[BUG]: UI Freezes for a few minutes if repo has binary files #4084

Closed

Description

@istarkov

Description

Started here
#3776 (comment)

If the agent generates binary files (for example, images),

https://github.com/sst/opencode/blob/34ff87d504836ff71b3bb2d466842c00ee3c5ec2/packages/opencode/src/snapshot/index.ts#L143

diffFull returns the binary content encoded as strings in the before and after fields.

A 4 MB image becomes a 20 MB+ string.

Image Image

This causes the UI to freeze for minutes likely due to memory allocation/copy etc issues after new prompt. (depends on amount of binary content)

There’s also a noticeable delay (a few seconds) when switching sessions (especially child sessions).

For AI related work it can be huge non binary files, such as CSVs and others.

⸻

What to do?

Fix
#4109

OpenCode version

1.0.45

Steps to reproduce

Generate images or/and binary files

Screenshot and/or share link

#3776 (comment)

Operating System

macOs 26

Terminal

iTerm 2

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 8, 2025
  2. github-actions commented on Nov 8, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions