pyright-langserver stays at 100% CPU after subagent finishes #9352

Open
opened 2026-02-16 18:12:15 -05:00 by yindo · 1 comment
Owner

Originally created by @DeluxeMonster on GitHub (Feb 14, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Possibly related to #3628.
In my environment, after a Python subagent finishes, the spawned pyright language server sometimes remains at ~100% CPU indefinitely until I stop the parent opencode session.
Observed process command:
.../opencode run .../pyright/dist/pyright-langserver.js --stdio
I can reproduce this repeatedly.

Additional context

  • Bundled pyright version: 1.1.408 (latest)
  • In logs, I observed textDocument/didChange and then textDocument/publishDiagnostics only at about +777326ms (~13 minutes later), while CPU stayed high.

Plugins

No response

OpenCode version

1.2.2

Steps to reproduce

  1. Start opencode in a big Python project.
  2. Run a subagent that reads/analyzes Python files.
  3. Wait until the subagent reports completion.
  4. Run top or ps and observe CPU usage.

Screenshot and/or share link

No response

Operating System

fedora

Terminal

Windows terminal ssh into fedora bash

Originally created by @DeluxeMonster on GitHub (Feb 14, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Possibly related to #3628. In my environment, after a Python subagent finishes, the spawned pyright language server sometimes remains at ~100% CPU indefinitely until I stop the parent opencode session. Observed process command: `.../opencode run .../pyright/dist/pyright-langserver.js --stdio` I can reproduce this repeatedly. Additional context - Bundled pyright version: `1.1.408` (latest) - In logs, I observed `textDocument/didChange` and then `textDocument/publishDiagnostics` only at about `+777326ms` (~13 minutes later), while CPU stayed high. ### Plugins _No response_ ### OpenCode version 1.2.2 ### Steps to reproduce 1. Start opencode in a big Python project. 2. Run a subagent that reads/analyzes Python files. 3. Wait until the subagent reports completion. 4. Run `top` or `ps` and observe CPU usage. ### Screenshot and/or share link _No response_ ### Operating System fedora ### Terminal Windows terminal ssh into fedora bash
yindo added the bugperf labels 2026-02-16 18:12:15 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 14, 2026):

This issue might be a duplicate of or related to an existing issue. Please check:

  • #3628: "bug: sometimes pyright lsp hangs" - seems to cover a similar/related pyright hang issue
@github-actions[bot] commented on GitHub (Feb 14, 2026): This issue might be a duplicate of or related to an existing issue. Please check: - #3628: "bug: sometimes pyright lsp hangs" - seems to cover a similar/related pyright hang issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9352