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
In e.g. monorepos, where e.g. the frontend is separate from the backend, the eslint & tsserver LSP doesnt get enabled if starting opencode in the git root. If you go into the frontend folder, then LSP will properly enable.
NOTE: debug lsp diagnostics still shows it working in both, but it never gets enabled when reading or writing a file unless you start in the ./frontend root.
Plugins
N/A
OpenCode version
1.1.12
Steps to reproduce
Create git root
Create subfolder with frontend folder
Init JS project (e.g. npm init)
Open opencode in ./frontend -> LSP works, open opencode in ./, LSP doesnt.
Feel free to ignore if this doesn't address your specific case. However, the pattern suggests that LSP root directory detection in monorepos may be a broader issue affecting multiple language servers.
I added a more specific TypeScript repro and proposed narrow fix in #18694: #18694 (comment)
This seems like one concrete instance of the broader monorepo/root-selection problem described here: OpenCode can be launched from the repo root while the language project for the target file lives in a child package.
For TypeScript specifically, the low-risk first step would be to resolve typescript/lib/tsserver.js from the detected TypeScript workspace/LSP root first, then fall back to the launch directory. That would keep the change TypeScript-only while leaving a broader cross-language workspace-aware resolver design for separate discussion.
I also saw the previous closed/stale attempts in #7691 and #17359. If maintainers are still open to the narrower TypeScript version, I can take a fresh pass rather than starting with a full LSP-manager redesign.
Activity
github-actions commentedon Jan 10, 2026
This issue might be related to existing LSP monorepo issues. Please check:
Feel free to ignore if this doesn't address your specific case. However, the pattern suggests that LSP root directory detection in monorepos may be a broader issue affecting multiple language servers.
kobe2000 commentedon Apr 14, 2026
Human, this is an important issue~
samiralibabic commentedon May 8, 2026
I added a more specific TypeScript repro and proposed narrow fix in #18694: #18694 (comment)
This seems like one concrete instance of the broader monorepo/root-selection problem described here: OpenCode can be launched from the repo root while the language project for the target file lives in a child package.
For TypeScript specifically, the low-risk first step would be to resolve
typescript/lib/tsserver.jsfrom the detected TypeScript workspace/LSP root first, then fall back to the launch directory. That would keep the change TypeScript-only while leaving a broader cross-language workspace-aware resolver design for separate discussion.I also saw the previous closed/stale attempts in #7691 and #17359. If maintainers are still open to the narrower TypeScript version, I can take a fresh pass rather than starting with a full LSP-manager redesign.
sankalpmukim commentedon May 13, 2026
Dax removed the 'bug' label
Don't know how this will be prioritized now 🫠
geromueller commentedon May 16, 2026
This is an huge issue! Problem seems to be the use of Filesystem.Up function, it should be down :-)
github-actions commentedon Jul 16, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.