#2029·serena

Project registry grows unboundedly (autoregister hardcoded, no unregister) and is fully re-validated on every startup, contributing to MCP discovery races

Author: Serg2000MrCreated Sep 13, 2026Updated Sep 16, 2026

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:

  1. Lazy registry handling — load only the path list at startup, validate/load each project's project.yml on activate_project instead of at every server start.
  2. A serena project remove/unregister command (or automatic cleanup of non-existent paths) — today the only way to clean the registry is hand-editing serena_config.yml.
  3. An opt-out of autoregister for temporary paths.