You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LSP clients and subprocesses persist after a worktree root is deleted #50361
Deleting a workspace or worktree root while OpenCode is running leaves its cached LSP client alive. The language-server wrapper and ordinary subprocess descendants can also remain alive without another LSP request.
Reproduced against clean upstream dev at d870e22 (1.18.31) on macOS.
Plugins
None.
OpenCode version
d870e22 (dev, 1.18.31)
Steps to reproduce
Start OpenCode for a worktree containing a TypeScript file.
Trigger LSP use for that file.
Delete the worktree root externally while OpenCode remains running.
Do not make another LSP request.
Observe that the client remains cached and the server wrapper or an ordinary child process remains alive.
Expected behavior
Once the root is confirmed missing or replaced, OpenCode should retire only that root's LSP client and its owned process tree within a bounded period. A live sibling root should retain its existing cached client.
Screenshot and/or share link
Not applicable; this is a lifecycle issue.
Operating System
macOS
Terminal
Not applicable; reproduced through the LSP test harness.
V2 does not run language servers: it accepts and keeps lsp configuration, but it never starts or caches LSP clients or their subprocesses, so nothing is left running when a worktree root is deleted. To get v2: npm i -g @opencode/cli@latest or curl -fsSL https://opencode.ai/v2/install | bash (desktop: update the app). If you still see this on v2, please open a new issue with the details.
Activity
neriousy commentedon Oct 19, 2026
V2 does not run language servers: it accepts and keeps
lspconfiguration, but it never starts or caches LSP clients or their subprocesses, so nothing is left running when a worktree root is deleted. To get v2:npm i -g @opencode/cli@latestorcurl -fsSL https://opencode.ai/v2/install | bash(desktop: update the app). If you still see this on v2, please open a new issue with the details.