Skip to content

High CPU usage (100% single core) during TUI rendering #11119

Closed

Description

@alibert99

Description

Environment:

  • OpenCode version: 1.1.41
  • OS: Ubuntu 22.04 (Linux)
  • Terminal: VSCode Remote SSH terminal
  • Runtime: Bun
    Problem:
    Single CPU core hits 100% when OpenCode is running, even during idle/loading states.
    Diagnosis:
  • strace shows 99.94% time spent in futex() calls
  • Worker thread (TID 971375) consuming 67% CPU
  • Thread is reading from timerfd and constantly waking HeapHelper threads
  • Appears to be a busy-loop in TUI refresh cycle
    strace output:
    futex(0x78d0050ac160, FUTEX_WAKE_PRIVATE, 1) = 1
    (repeats thousands of times per second)
    Expected:
    CPU should be near 0% when idle/waiting for input.

Plugins

No response

OpenCode version

1.1.41

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

ubuntu 22.0.4

Terminal

VsCode

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    perfIndicates a performance issue or need for optimization
    on Jan 29, 2026
  2. github-actions commented on Jan 29, 2026

    @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.

  3. alibert99 commented on Jan 29, 2026

    @alibert99
    Author

    I confirm high CPU usage (100% one core) related to TUI. strace shows a busy loop on timerfd reads by the Worker thread.

  4. Junyi-99 commented on Jan 29, 2026

    @Junyi-99

    same here, the iTerm2 is using 45% CPUs when opencode is running

    Image

    When opencode is not running, the CPU usage backs to 4.2%

    Image

    However, when I switch to Ghostty, the cpu usage drops down to 9.8%

    Image
  5. unphased commented on Jan 30, 2026

    @unphased
    Image

    Something is definitely going on here.

    Nevermind, I think these are from stale dead tmux split instances from oh-my-opencode v3.1.2

  6. github-actions commented on Apr 1, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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