[FEATURE]: Deactivate unused LSP servers during a session #8979

Open
opened 2026-02-16 18:11:19 -05:00 by yindo · 2 comments
Owner

Originally created by @rombert on GitHub (Feb 10, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I am sometimes working in a monorepo-like setup, where I have 3-400 hundred projects checked out. I have wide-reaching tasks that require investigatin/changes in maybe 10-20 projects per session.

For each changed project, a JDT LSP server is instantiated. Those do add in up terms of memory available on my laptop and eventually lead to performance problems.

My workaround is to exit opencode and immediately resume the session - this way the LSP servers are stopped and respawned when needed.

It would be great if opencode would handle this gracefully by deactivating LSP servers for projects that were not recently used in the current session.

Originally created by @rombert on GitHub (Feb 10, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I am sometimes working in a monorepo-like setup, where I have 3-400 hundred projects checked out. I have wide-reaching tasks that require investigatin/changes in maybe 10-20 projects per session. For each changed project, a JDT LSP server is instantiated. Those do add in up terms of memory available on my laptop and eventually lead to performance problems. My workaround is to exit opencode and immediately resume the session - this way the LSP servers are stopped and respawned when needed. It would be great if opencode would handle this gracefully by deactivating LSP servers for projects that were not recently used in the current session.
yindo added the discussionperf labels 2026-02-16 18:11:19 -05:00
Author
Owner

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

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

  • #11368: JDTLS spawns redundant per-module processes in Java monorepos, causing OOM
  • #12596: ElixirLS LSP client spawns new process per request, causing timeout and process leak
  • #7690: LSP detection in monorepo not working
  • #7227: [FEATURE]: Disable LSP for external directories
  • #8947: [FEATURE]: TUI whole and LSP memory limits as part of configuration

These issues all relate to LSP memory management and process accumulation in monorepos. Your feature request (#12976) is well-documented and addresses a specific need for deactivating unused LSP servers during a session, which would complement the above discussions on LSP resource management.

@github-actions[bot] commented on GitHub (Feb 10, 2026): This issue might be a duplicate of existing issues. Please check: - #11368: JDTLS spawns redundant per-module processes in Java monorepos, causing OOM - #12596: ElixirLS LSP client spawns new process per request, causing timeout and process leak - #7690: LSP detection in monorepo not working - #7227: [FEATURE]: Disable LSP for external directories - #8947: [FEATURE]: TUI whole and LSP memory limits as part of configuration These issues all relate to LSP memory management and process accumulation in monorepos. Your feature request (#12976) is well-documented and addresses a specific need for deactivating unused LSP servers during a session, which would complement the above discussions on LSP resource management.
Author
Owner

@rombert commented on GitHub (Feb 10, 2026):

This is related to #11368 but not the same. In my case there is no 'root' pom.xml, the projects are independent. But if JDT can handle mutiple unrelated projects with a single instance then that's good.

@rombert commented on GitHub (Feb 10, 2026): This is related to #11368 but not the same. In my case there is no 'root' pom.xml, the projects are independent. But if JDT can handle mutiple unrelated projects with a single instance then that's good.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8979