UAT: agents lsp registry data is lost between CLI invocations #7985

Open
opened 2026-04-12 18:23:04 +00:00 by HAL9000 · 0 comments
Owner

Summary

  • agents lsp add only stores registrations in the process-local _registry
  • launching any other agents lsp command starts a fresh process with a brand new registry, so no servers persist
  • actors and the runtime cannot ever discover registered LSP servers, violating docs/specification.md §LSP Integration — agents lsp

Steps to Reproduce

  1. In shell A (with PYTHONPATH pointing at the repo src) run:
    from typer.testing import CliRunner
    from cleveragents.cli.commands import lsp
    from pathlib import Path
    Path('persist.yaml').write_text("name: local/persist
    

command: stub
languages: [python]
capabilities: [diagnostics]
")
result = CliRunner().invoke(lsp.app, ['add', '--config', 'persist.yaml'])
print(result.exit_code, result.stdout)

2. In shell **B** (same `PYTHONPATH`, fresh process) run:
```python
from typer.testing import CliRunner
from cleveragents.cli.commands import lsp
result = CliRunner().invoke(lsp.app, ['list'])
print(result.exit_code, result.stdout)
  1. Observe shell B prints No LSP servers found. even though shell A just registered local/persist

Expected Result

  • LSP servers registered via agents lsp add persist in the global registry so subsequent CLI calls and the runtime can see them

Actual Result

  • Every CLI invocation starts with an empty in-memory registry; registrations disappear immediately after the add command exits

Additional Details

  • cleveragents/cli/commands/lsp.py keeps _registry as a module-level variable backed by the in-memory LspRegistry; there is no persistence or call into ResourceRegistry services
  • LspRuntime constructs a fresh LspRegistry() instance, so runtime lookups can never succeed either
  • Spec §LSP Integration describes agents lsp as managing the global registry; this implementation is process-scoped and non-functional
  • Commit: 8b7bdb5edf

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Summary - `agents lsp add` only stores registrations in the process-local `_registry` - launching any other `agents lsp` command starts a fresh process with a brand new registry, so no servers persist - actors and the runtime cannot ever discover registered LSP servers, violating **docs/specification.md §LSP Integration — agents lsp** ## Steps to Reproduce 1. In shell **A** (with `PYTHONPATH` pointing at the repo `src`) run: ```python from typer.testing import CliRunner from cleveragents.cli.commands import lsp from pathlib import Path Path('persist.yaml').write_text("name: local/persist command: stub languages: [python] capabilities: [diagnostics] ") result = CliRunner().invoke(lsp.app, ['add', '--config', 'persist.yaml']) print(result.exit_code, result.stdout) ``` 2. In shell **B** (same `PYTHONPATH`, fresh process) run: ```python from typer.testing import CliRunner from cleveragents.cli.commands import lsp result = CliRunner().invoke(lsp.app, ['list']) print(result.exit_code, result.stdout) ``` 3. Observe shell **B** prints `No LSP servers found.` even though shell **A** just registered `local/persist` ## Expected Result - LSP servers registered via `agents lsp add` persist in the global registry so subsequent CLI calls and the runtime can see them ## Actual Result - Every CLI invocation starts with an empty in-memory registry; registrations disappear immediately after the `add` command exits ## Additional Details - `cleveragents/cli/commands/lsp.py` keeps `_registry` as a module-level variable backed by the in-memory `LspRegistry`; there is no persistence or call into ResourceRegistry services - `LspRuntime` constructs a fresh `LspRegistry()` instance, so runtime lookups can never succeed either - Spec §LSP Integration describes `agents lsp` as managing the *global* registry; this implementation is process-scoped and non-functional - Commit: 8b7bdb5edfb72b4ef30ac9417bc012069d5efd3f --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#7985
No description provided.