GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — High CPU usage · Issue #4804 · anomalyco/opencode

High CPU usage #4804

New issue
Copy link
New issue
Copy link
Closed
Closed
High CPU usage#4804
Copy link
Assignees
thdxrrekram1-node
Labels
bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiperfIndicates a performance issue or need for optimization

Description

@shantur
shantur
opened on Nov 26, 2025
Issue body actions

Description

I use opencode on MacOS ( Intel ) and after sometime the CPU usage keeps increasing.
Even when session is idle, the CPU usage stays high.

My main usage is in 2 projects and I see the same behaviour in both.

  1. typescript, javascript, html app
  2. Dart / Flutter app

I don't use it anywhere else so not sure if this is related.

OpenCode version

1.0.110

Steps to reproduce

Unsure of the steps.
Just keep using opencode, switch sessions, fork sessions etc

Screenshot and/or share link

Image

Operating System

macOS 15.7.2

Terminal

iTerm2, CodeNomad

Reacted by Yukai Huang, Thomas Mol, André Schärpf, Jensen and DavidGOrtega

Activity

  1. shantur
    added
    bugSomething isn't working
    on Nov 26, 2025
  2. github-actions
    added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 26, 2025
  3. github-actions commented on Nov 26, 2025

    @github-actions
    github-actionsBot
    on Nov 26, 2025 – with GitHub Actions
    Contributor
    More actions

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

    • Text rendering is VERY slow (and CPU usage is really high even when idle) #811: Text rendering is VERY slow (and CPU usage is really high even when idle) - Closed but reports similar high CPU usage on idle
    • Opencode freezes when pressing option + left arrow key on MacBook with high CPU usage #2688: Opencode freezes when pressing option + left arrow key on MacBook with high CPU usage - MacBook CPU spike issue
    • High RAM usage in latest release #2805: High RAM usage in latest release - Related to high resource usage
    • Uses a huge amount of memory #3013: Uses a huge amount of memory - Memory usage keeps increasing with AI use
    • OpenTUI causes crashes and heavy memory usage #3798: OpenTUI causes crashes and heavy memory usage - opentui related resource consumption

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

  4. rekram1-node
    added
    perfIndicates a performance issue or need for optimization
    on Nov 26, 2025
  5. rekram1-node
    assigned
    thdxr
    and
    rekram1-node
    on Nov 26, 2025
  6. thdxr commented on Nov 27, 2025

    @thdxr
    thdxr
    on Nov 27, 2025
    Member
    More actions

    do you have permissions turned on?

  7. pablonification commented on Nov 27, 2025

    @pablonification
    pablonification
    on Nov 27, 2025
    More actions

    happens to me too

  8. shantur commented on Nov 27, 2025

    @shantur
    shantur
    on Nov 27, 2025
    ContributorAuthor
    More actions

    do you have permissions turned on?

    No permissions aren't enabled in any of the projects

  9. andre-schaerpf commented on Dec 2, 2025

    @andre-schaerpf
    andre-schaerpf
    on Dec 2, 2025
    More actions

    Just observed an agent running into this very issue on accident. Reproduction steps are as follows:

    • Asked an agent to implement some feature and trigger a build / compile afterwards.
    • Agent completed the implementation and compiled successfully, which caused our build output directory to fill up (and, due to a misconfiguration on my end, this directory is not in any .gitignore file or similar)
    • Agent noticed the huge amount of new files after checking git status and decided to remove them using rm -rf.
    • After freezing for about 30s, OpenCode's "Modified Files" sidebar started listing every single deleted file that previously existed in the now deleted directory. In this state, the TUI does not react to any key presses anymore and needs to be killed.

    I submitted #4963 to introduce pagination for this scenario.

  10. rekram1-node commented on Dec 2, 2025

    @rekram1-node
    rekram1-node
    on Dec 2, 2025
    Member
    More actions

    are you sure the issue was the sidebar rendering and not the diff checking? just curious

    Did you use btop to figure that out

  11. andre-schaerpf commented on Dec 2, 2025

    @andre-schaerpf
    andre-schaerpf
    on Dec 2, 2025
    More actions

    The diff itself seems to be pretty fast - at least based on what I saw during debugging. I did not measure the timing though (also no btop).
    My first approach was to change the diff panel to be collapsed by default while leaving the diff logic itself unchanged. This immediately improved performance for me; at least until I manually expanded the panel again, which then caused a freeze as expected.

  12. rekram1-node commented on Dec 2, 2025

    @rekram1-node
    rekram1-node
    on Dec 2, 2025
    Member
    More actions

    Ahh okay good to know

  13. rekram1-node commented on Dec 2, 2025

    @rekram1-node
    rekram1-node
    on Dec 2, 2025
    Member
    More actions

    i'll take a look at the pr just wanted to make sure we address core issue

    Reacted by André Schärpf
  14. paralin commented on Dec 2, 2025

    @paralin
    paralin
    on Dec 2, 2025
    Contributor
    More actions

    What I'm seeing is quite a bit different. If I tab away from the agent for a long time, then tab back, it's quite laggy - sometimes typing is very slow, and if I press enter it will send the message without everything I typed in there. And then it won't show the agent replying until some time later (after a delay). Often I Ctrl c out of open code then reopen it and go to the session to see that the agent indeed was working and I had just interrupted it midway due to the UI lag. Maybe opencode is trying to update the display constantly when nothing is changing (while tabbed out) and this all gets buffered somehow lagging out future updates? Just a guess.

  15. shantur commented on Dec 24, 2025

    @shantur
    shantur
    on Dec 24, 2025
    ContributorAuthor
    More actions

    This was Bun stderr bug present on macOS Sequoia

  16. shantur
    closed this as completedon Dec 24, 2025
  17. shitastical commented on Jan 20, 2026

    @shitastical
    shitastical
    on Jan 20, 2026
    More actions

    This is still an issue for me on linux.

    Reacted by Jj, Kiril Mitov, SHU-red, joofjang, Danny, kingkong-cmd, Junyi Hou, manascb1344, intermittent.energy, Lucas Vanoverberghe and 8 more
  18. manascb1344 commented on Jan 30, 2026

    @manascb1344
    manascb1344
    on Jan 30, 2026
    More actions

    Yes, dont know why on linux its unusually HIGH!!

  19. Hronom commented on Mar 11, 2026

    @Hronom
    Hronom
    on Mar 11, 2026
    More actions

    Same for me, version 1.2.24 desktop version. Ubuntu 24.04.4 LTS

  20. roccolycos commented on Mar 11, 2026

    @roccolycos
    roccolycos
    on Mar 11, 2026
    More actions

    Same on 1.2.24 in Ubuntu Server 24.04.4 LTS

  21. cloudmidleman commented on Mar 15, 2026

    @cloudmidleman
    cloudmidleman
    on Mar 15, 2026
    More actions

    same Ubuntu Server 24.04.4 LTS

  22. Hronom commented on Mar 24, 2026

    @Hronom
    Hronom
    on Mar 24, 2026
    More actions

    Why this closed? Desktop version not usable at linux because of this. Not sure about CLI.
    Version 1.3.0, ubuntu 24.04.4 LTS

  23. chris-hatton commented on Mar 26, 2026

    @chris-hatton
    chris-hatton
    on Mar 26, 2026
    More actions

    Issue remains on macOS 1.2.27!
    Terrible issue, MacBook just burning up during regular use for no reason.
    This is what happens when you make Desktop Apps with Web Technologies.

  24. DavidGOrtega commented on Jul 11, 2026

    @DavidGOrtega
    DavidGOrtega
    on Jul 11, 2026
    More actions

    I feel the same pain... very high cpu use. I love opencode but Im willing ti find other alternatives

  25. douglangille commented on Aug 29, 2026

    @douglangille
    douglangille
    on Aug 29, 2026
    More actions

    this issue is still live in 1.18.23.

    opencode-sample.txt

    Reacted by Lam Nguyen and wikes82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node
  • @thdxr
    thdxr

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiperfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.