Repository navigation
Open
Description
Summary
On Windows 11, opencode-cli.exe (OpenCode Desktop 2.0.18) pins ~100% of one CPU core for the entire time a shell tool command is running — even when the command only sleeps and produces no output. Memory use is ~0.7 GB. The sleeping child process itself uses ~0% CPU.
Environment
- opencode version: 2.0.18 (
opencode-cli.exe --version→opencode v2.0.18; desktop-bundled CLI, not on PATH) - OS: Microsoft Windows [Version 10.0.26200.9457] (Windows 11)
- Terminal: OpenCode Desktop app (Electron);
TERM=xterm-256color,TERM_PROGRAMandCOLORTERMunset - Shell:
C:\WINDOWS\system32\cmd.exe - Install/channel: OpenCode Desktop release, latest (updater reports "Update for version 2.0.18 is not available"); CLI at
%APPDATA%\ai.opencode.desktop\cli\2.0.18\opencode-cli.exe - Active plugins: none found (checked
opencode.json/opencode.jsoncin the workspace and~/.config/opencode/, plusplugin/pluginsdirectories). MCP servers are configured in~/.config/opencode/opencode.jsonc, all with"disabled": true
Reproduction
- On Windows 11, run OpenCode Desktop 2.0.18 and use a session for a while (in my case ~3.5 h of history with many tool calls).
- Have the agent run a shell command that takes a while without output, e.g.
powershell -NoProfile -Command "Start-Sleep -Seconds 60". - While the command runs, watch
opencode-cli.exeCPU in Process Explorer / Task Manager.
Expected Behavior
The CLI process should be near-idle while waiting for the child process. Only the child command should consume resources (it used ~0%).
Actual Behavior
opencode-cli.exe consumes ~100% of one CPU core for the whole duration of the command:
- foreground command, 20 s window: 20.16 s of CPU time in 20 s wall clock (100.8% of one core);
- background command, 60 s window, sampled every 5 s (% of one core): 101.2, 98.1, 101.2, 99.7, 99.1, 99.7, 99.4, 99.4, 99.7, 100, 101.6, 100 — average 99.9%;
- process memory: Private Bytes ~765 MB, Working Set ~440 MB (CLI process alone).
During one measured 60 s window the CLI wrote no log lines and spawned no subprocesses (~/.local/share/opencode/log/opencode.log), so the busy loop is silent.
Additional Context
- Working directory is a local git workspace containing a large
.venv(~60k files), amodels\folder (~1.3 GB) and anoutput\folder with six ~60 MB WAV files. This may matter for the watcher/snapshot subsystem (cf. fff watcher: GitStatusCache loops even after file changes stop, resulting in 100% cpu usage #42557 "GitStatusCache loops"), but the CPU is burned inside the CLI process, and during the measured idle window nogit.exechild was spawned. - Desktop
renderer.loghas 1145ResizeObserver loop completed with undelivered notifications.errors since launch (bursts of layout loops on updates) — probably related to [Desktop] UI freezes after agent turns finish — renderer stuck in ResizeObserver loop; only force-quit + relaunch recovers #43355, though in my case the UI does not freeze. - Possibly related: TUI: main thread burns ~100% CPU continuously redrawing a spinner (~15fps writev to tty) with no active output #42306 (TUI spinner burns ~100% CPU with no active output), fff watcher: GitStatusCache loops even after file changes stop, resulting in 100% cpu usage #42557, [Desktop] UI freezes after agent turns finish — renderer stuck in ResizeObserver loop; only force-quit + relaunch recovers #43355, Desktop (macOS, Electron): high CPU usage during active use, CHROME_HEADLESS=1 works around it, but silently disables all window shadows #48120.
- Not tried yet: restarting the app, a fresh short session, a small/empty workspace, or closing the app (closing should free the core).
- Workaround: none found yet.
- A Process Explorer screenshot from the reporter is available.

Reacted by Shouyuan
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Sep 28, 2026
This issue might be a duplicate of existing issues. Please check:
opencodejr commentedon Oct 28, 2026
Thanks for the detailed measurements! I tried this on Linux with the 2.0.18 CLI and a simulated model, running a real silent
sleep 40through the shell tool. There the OpenCode server used about 2% of a core and the TUI about 6% (mostly the spinner) while the command ran. I couldn't get the ~100% busy loop you measured.Your setup differs from what I can test here in several ways: Windows 11, the CLI bundled with OpenCode Desktop,
cmd.exeas the shell, a long session and a large workspace. Windows has its own code for waiting on processes, so this needs a maintainer with Windows and the Desktop app to check.If you have time, these would help narrow it down:
.venv?Related issues (none of them looks like the same problem):