Skip to content

fix(lsp): make language-server installs opt-in (#25015)#44134

Open
egilewski wants to merge 1 commit into
NousResearch:mainfrom
egilewski:codex/lsp-installs-opt-in-25015
Open

fix(lsp): make language-server installs opt-in (#25015)#44134
egilewski wants to merge 1 commit into
NousResearch:mainfrom
egilewski:codex/lsp-installs-opt-in-25015

Conversation

@egilewski

@egilewski egilewski commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

LSP was enabled by default and missing server binaries could be installed
automatically on first use. That meant a first edit inside a git workspace
could trigger npm, go, or pip installs under HERMES_HOME without an
explicit user configuration choice.

This makes the LSP defaults opt-in: DEFAULT_CONFIG["lsp"]["enabled"]
is now false, service fallback defaults are disabled/manual, and the
standalone ServerContext default no longer permits installs. Users who
explicitly set lsp.enabled: true or lsp.install_strategy: auto keep
that behavior. The LSP docs now show the opt-in flow.

Validation

  • /home/mac/hermes-agent/.venv/bin/python -m pytest tests/agent/lsp/test_opt_in_defaults.py tests/hermes_cli/test_config.py
  • /home/mac/hermes-agent/.venv/bin/python -m py_compile hermes_cli/config.py agent/lsp/manager.py agent/lsp/servers.py agent/lsp/install.py agent/lsp/__init__.py tests/agent/lsp/test_opt_in_defaults.py
  • git diff --check
  • git diff --cached --check
  • git diff --check upstream/main...HEAD
  • coderabbit review --plain --type committed --base upstream/main

CodeRabbit returned one trivial suggestion to add a public
LSPService.install_strategy property only for test assertions. The service
already exposes this value through LSPService.get_status(), and adding a
second public accessor would broaden the API only to make a narrow regression
test avoid an internal assertion, so I left the code unchanged.

Fixes #25015


Created by gpt-5.5 (xhigh reasoning) in Codex. Human involvement: general issue selection and resolution guidelines; commit signing; checking notifications.

LSP defaults enabled the service and allowed missing server binaries to
auto-install on first use. A first edit in a git workspace could
therefore trigger npm, go, or pip installs under HERMES_HOME without an
explicit user configuration choice.

Make the default config and service fallback disabled/manual, and make
the standalone ServerContext default manual as a defensive default.
Existing users who explicitly set lsp.enabled or lsp.install_strategy
keep that behavior; the LSP docs now show the opt-in flow.

Validation:
- /home/mac/hermes-agent/.venv/bin/python -m pytest tests/agent/lsp/test_opt_in_defaults.py tests/hermes_cli/test_config.py
- /home/mac/hermes-agent/.venv/bin/python -m py_compile hermes_cli/config.py agent/lsp/manager.py agent/lsp/servers.py agent/lsp/install.py agent/lsp/__init__.py tests/agent/lsp/test_opt_in_defaults.py
- git diff --check
- git diff --cached --check

Fixes NousResearch#25015
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles labels Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lsp: opt-in defaults — enable + auto-install on first edit is too aggressive

2 participants