Skip to content

opencode utilization at 99-100% randomly - opencode unresponsive #33399

Closed as duplicate

Description

@tokkenT

Description

Periodically opencode cli process hits 99-100% cpu utilization. Resulting in fans kicking in. Also, results in the cli not able to take any keyboard inputs. Essentially dead. Uncertain what exactly it is being done with this.

Started using opencode since 1.3.3. - this wasn't an issue
first noted in 1.15.x version have
also issue in 1.16.x

Only fix is it close terminal or kill opencode process

Plugins

No response

OpenCode version

1.15.11

Steps to reproduce

  1. use opencode
  2. leave or use
  3. randomly results in 99-100% cpu utilization

not able to reproduce since not sure what triggers it.
notice that the longer the open session (which is essentially always until this spike occurs)

Updated Summary: (edited 2026-06-25 2:58PM)

  • 1.15.11

  • cpu spikes to over 98% randomly, even when not using opencode just idle in the background

  • keystrokes are nonresponse in cli

  • 5 minutes tested with no self resolution

  • randomly, can't switch from build to plan or vice versa

  • 1.17.11

  • runs at 100-300% CPU utilization for very minor requests vs 1.15.11 that uses 50-65% CPU utilization

  • results aren't that much better than 1.15.13

  • 1.18.33 (updated: 2026-09-30)

  • issue still persistences even with latest build

  • idle opencode continues to run out of control hitting 99% CPU where opencode is not being even used just open

  • indicator is fans are blowing high and activity monitor shows 99% utilization.

Screenshot and/or share link

No response

Operating System

No response

Terminal

macOS terminal

Activity

  1. github-actions commented on Jun 22, 2026

    @github-actions
    Contributor

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

    If your issue is the same as one of the above, please add a comment there with any additional details rather than opening a new issue.

  2. tokkenT commented on Jun 23, 2026

    @tokkenT
    Author

    upgrade to [v1.17.9] result in cpu usage at 191%

    • noted that it was when system was idle.
  3. tokkenT commented on Jun 23, 2026

    @tokkenT
    Author

    a few tests:

    • 1.3.17 seems to be fine
    • 1.3.x seems to be fine
      1.14.0 issue is present
    • 1.3.x - issue is present
    • 1.14.7 issue is present
    • 1.14.x - issue is present
    • 1.15.x issue is present
    • 1.16.x issue is present
    • 1.17.x issue is present - shows a 191% utilization

    no way to exit out of issue. have to force quit and session context is lost.

  4. simonklee commented on Jun 24, 2026

    @simonklee
    Member

    The next OpenCode release uses OpenTUI v0.4.2. This release fixes a possible cause of blocked input in the macOS threaded terminal renderer.

    The original issue happens intermittently, and its hard to reproduce reliably. As a result, I cannot confirm that this renderer bug caused the CPU spike and keyboard freeze.

    If you experienced this issue, please test a build that uses OpenTUI v0.4.2. Let us know whether the CPU spike or keyboard freeze happens again.

    If OpenCode becomes unresponsive, capture a process sample while the problem is active:

    sample <pid> 10 -file opencode-sample.txt
    

    Attach the sample and include:

    • Your OS version
    • Your terminal and version
  5. tokkenT commented on Jun 25, 2026

    @tokkenT
    Author

    also noticed that opencode CPU for v1.17.11 is 100-300% (constantly) CPU had to downgrade to 1.15.11.

    • which still has random opencode usage that goes over 100%
    • cli freezes for inputs but the CPU utilization is consistently under 100 (20-60% spikes)
  6. tokkenT commented on Jun 25, 2026

    @tokkenT
    Author

    @simonklee - attached is the spin dump where opencode process was >96.8% to 99 % cpu utilization

    • system was not using opencode for hours prior to this.
    • cli was in the background unused for hours
    • spike remained this high for minutes for no reason
    • cli was nonresponse, no keyboard stroke taken.
    • esc key not working either
    • opencode cli nonresponse at all.
    • had to force quit cli after 5 minutes of no self resolution

    after force quit issue

    spindump - 2026-06-25 1448.txt

    (url)

  7. tokkenT commented on Jun 28, 2026

    @tokkenT
    Author

    this is random and when the opencode cli is idle.

    Unfortunately there is no recovery from this a force quit of opencode process that result in the opencode cli outputting characters continuously and the context window is lost. The terminal with the cli has to be closed and is useable when this occurs.

  8. Ginglowter commented on Aug 10, 2026

    @Ginglowter

    версия 1.18.16, Windows 11 (26200), главный процесс 100% CPU на ядро, рестарт не помогает

    issue-body.md

  9. tokkenT commented on Sep 29, 2026

    @tokkenT
    Author

    Unresolved still an issue with v1.18.33. open code idle for hours then returning to computer fan blowing extensively and activity monitor showing opencode process at 99% cup utilization.

  10. simonklee commented on Sep 29, 2026

    @simonklee
    Member

    Please update to latest version of opencode. https://opencode.ai/v2/docs

  11. tokkenT commented on Sep 30, 2026

    @tokkenT
    Author

    @simonklee - perhaps you missed where I shared I was on the v1.18.33 which is the latest released.

    this is an issue with the latest release, STILL. Unsure why this bug isn't addressed. Seems pretty major if opencode is taking up 99% of the CPU and is not responsive at all. The only way to disable it, is to force quite the process, since 1.15.x .

  12. simonklee commented on Sep 30, 2026

    @simonklee
    Member

    The latest release is https://opencode.ai/v2/docs not 1.18.xx. I suggest updating because we’re not patching the 1.18 tree other than inference related and other minor issues.

  13. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    Closing as a duplicate of #19466, which tracks OpenCode using high CPU. Please add your platform and version there. As noted above, please retest on v2 (https://opencode.ai/v2/docs); 1.18 isn't getting fixes for this.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions