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
Run LSP only at session end only, asking to fix errors in a subsequent message #2536
LSP is way too aggressive. The LLM shouldn't need to fix errors after a single tool call, because most edits are expected to create an invalid file, for example when removing a variable in different places. The LSP adds too much noise to the LLM
Mmm.. This is killer feature for me 😄 Other tools can use inexistent method or syntax. OpenCode always verifies after editing. If you expect errors and it's okay for you use case, you can instruct to ignore errors in the prompt. Its edge case in my opinion
It's not about expecting errors in our code. It's about surfacing errors in the right moment. Surfacing errors on every message does not improve agent behavior.
It's not about expecting errors in our code. It's about surfacing errors in the right moment. Surfacing errors on every message does not improve agent behavior.
depends on the case. In most cases I faced, when LLM goes wrong way, the problem should be fixed immediately. On the end of the session can be too late. Many changes have been made to the code and at the end we say "the entire flow was broken, do something with this". Imagine that you use API for creating app and at the end it turns out that such API doesn't exist.
I have found it adds a lot of noise/pollution to the context. The models are good enough now to mostly avoid creating compiler/language level errors when they make changes, and even when errors are made it quickly resolves them with a compile/type check after making changes.
If not disabled by default maybe add to the config a way to disable all LSPs rather than having to disable each on a language by language basis.
Here is an example just now when editing lua it thinks there's an error when there isn't (maybe due to lsp delay?) leading to the model then running a check only to realize there is no error ("Hmm, there's no error actually" followed by the Read tool use does not happen with lua LSP disabled):
┃
┃ ← Edit nvim/.config/nvim/lua/plugins/sidekick.lua
┃
┃ end,
┃ desc = "Detach a CLI Session",
┃ },
┃ {
┃ + "az",
┃ + function()
┃ + require("sidekick.cli").hide()
┃ + end,
┃ + desc = "Hide CLI",
┃ +},
┃ +{
┃ "<leader>aa",
┃ function()
┃ require("sidekick.cli").toggle({ name = "opencode", focus = true })
┃ end,
┃
┃ Thinking: Let me read the file again to make sure I have the exact formatting right.
┃
┃ # Check for Lua syntax errors
┃
┃ $ cd /Users/jbm/dotfiles/nvim/.config/nvim && nvim --headless -c "luafile lua/plugins/
┃ sidekick.lua" -c "quit" 2>&1
┃
┃ Thinking: Hmm, there's no error actually. Let me re-read the file to verify the edit was
┃ applied.
→ Read nvim/.config/nvim/lua/plugins/sidekick.lua [offset=60, limit=20]
┃ Thinking: The edit was successfully applied! The new keymap az is now in the configuration
┃ at lines 68-74, which will call require("sidekick.cli").hide() to hide the CLI.
Done! Added az keymap to hide the CLI at line 68-74.
I agree this is a real pain point. The current behavior forces users to choose between:
"lsp": false - lose all LSP features (hover, go-to-definition, etc.)
Keep LSP enabled - deal with noisy inline diagnostics after every edit
Suggestion: Add a config option like lsp.diagnostics.inline: boolean (default true to preserve current behavior). When set to false:
LSP servers still run, so hover/go-to-definition/references tools work
edit and write tools skip the LSP.touchFile() wait and diagnostics output
This way agents can run bun typecheck or similar commands explicitly when they're ready, rather than being interrupted by incomplete-code errors mid-edit.
@ethan-huo what LSP features would u be losing if u turned them off, the only thing that would stop working is the lsp tool and that's experimental so u prolly dont have it anyway
@ethan-huo what LSP features would u be losing if u turned them off, the only thing that would stop working is the lsp tool and that's experimental so u prolly dont have it anyway
changed the title [-]Disable LSP by default. Or run it at session end only, asking to fix errors in a subsequent message[/-][+]Run LSP only at session end only, asking to fix errors in a subsequent message[/+]on Jan 24, 2026
Activity
github-actions commentedon Sep 10, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
divmgl commentedon Sep 10, 2025
+1, this pollutes the context and confuses the agent nonstop
NaikSoftware commentedon Sep 12, 2025
Mmm.. This is killer feature for me 😄 Other tools can use inexistent method or syntax. OpenCode always verifies after editing. If you expect errors and it's okay for you use case, you can instruct to ignore errors in the prompt. Its edge case in my opinion
divmgl commentedon Sep 13, 2025
It's not about expecting errors in our code. It's about surfacing errors in the right moment. Surfacing errors on every message does not improve agent behavior.
remorses commentedon Sep 13, 2025
NaikSoftware commentedon Sep 13, 2025
depends on the case. In most cases I faced, when LLM goes wrong way, the problem should be fixed immediately. On the end of the session can be too late. Many changes have been made to the code and at the end we say "the entire flow was broken, do something with this". Imagine that you use API for creating app and at the end it turns out that such API doesn't exist.
jbuckmccready commentedon Nov 15, 2025
I have found it adds a lot of noise/pollution to the context. The models are good enough now to mostly avoid creating compiler/language level errors when they make changes, and even when errors are made it quickly resolves them with a compile/type check after making changes.
If not disabled by default maybe add to the config a way to disable all LSPs rather than having to disable each on a language by language basis.
Here is an example just now when editing lua it thinks there's an error when there isn't (maybe due to lsp delay?) leading to the model then running a check only to realize there is no error ("Hmm, there's no error actually" followed by the
Readtool use does not happen with lua LSP disabled):ethan-huo commentedon Jan 1, 2026
I agree this is a real pain point. The current behavior forces users to choose between:
"lsp": false- lose all LSP features (hover, go-to-definition, etc.)Suggestion: Add a config option like
lsp.diagnostics.inline: boolean(defaulttrueto preserve current behavior). When set tofalse:editandwritetools skip theLSP.touchFile()wait and diagnostics outputThis way agents can run
bun typecheckor similar commands explicitly when they're ready, rather than being interrupted by incomplete-code errors mid-edit.rekram1-node commentedon Jan 1, 2026
@ethan-huo what LSP features would u be losing if u turned them off, the only thing that would stop working is the lsp tool and that's experimental so u prolly dont have it anyway
ethan-huo commentedon Jan 2, 2026
I set
OPENCODE_EXPERIMENTAL_LSP_TOOL=true[-]Disable LSP by default. Or run it at session end only, asking to fix errors in a subsequent message[/-][+]Run LSP only at session end only, asking to fix errors in a subsequent message[/+]github-actions commentedon Mar 27, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.