Project registry grows unboundedly (autoregister hardcoded, no unregister) and is fully re-validated on every startup, contributing to MCP discovery races
Serena autoregisters every path passed to activate_project into serena_config.yml → projects: — including temporary working copies, tool bin-dirs and per-task worktrees. autoregister=True is hardcoded in the CLI (serena/config/cli.py, get_registered_project(..., autoregister=True)), there is no opt-out, no serena project remove/unregister command, and stale entries produce warnings on every start.
On every startup, every serena process (hosts typically run one per session) re-reads and validates the project.yml of all registered entries: measured ~1.0–1.5 s for 26 entries on Windows, growing linearly. This stacks with the slow-start discovery race reported in #2012: hosts with a fixed tool-discovery window (ZCode ~15 s, measured 15.0–15.1 s) lose serena's tools whenever startup exceeds it; users maintaining dozens of per-task worktrees make the miss a certainty over time.
Requested:
- Lazy registry handling — load only the path list at startup, validate/load each project's
project.ymlonactivate_projectinstead of at every server start. - A
serena project remove/unregistercommand (or automatic cleanup of non-existent paths) — today the only way to clean the registry is hand-editingserena_config.yml. - An opt-out of autoregister for temporary paths.
Source: oraios/serena