bug: extension tool name conflicts crash all pi RPC sessions
Description
When two pi extensions register a tool with the same name (e.g. code_search), pi-web-access throws a fatal error during registerTool(), crashing the entire pi --mode rpc process at startup. This kills all dashboard chat sessions.
Steps to reproduce
- Install both
pi-lsp-extensionandpi-web-access - Both register a tool named
code_search - Open any chat in the dashboard
- pi process crashes immediately:
Error: Failed to load extension "pi-web-access": Tool "code_search" conflicts with pi-lsp-extension - No sessions work until the conflict is resolved
Expected behavior
Tool name conflicts should be non-fatal — log a warning, skip the duplicate registration, and keep running.
Actual behavior
Fatal crash. All pi functionality lost.
Root cause
pi-web-access does its own tool name conflict check in registerTool() and throws instead of logging. Pi's built-in conflict detection (in resource-loader.js) is non-fatal and runs after extension loading, but the extension's own check runs first.
Fix applied
Renamed pi-lsp-extension's code_search → ast_search (v0.1.2).
Upstream fix needed
pi-web-access (third-party) should not throw fatally on conflicts. This is also a resilience gap in the dashboard — if any extension crashes pi, all sessions die silently (see #1).
Mitigation for dashboard
The dashboard's PiManager should handle pi startup failures gracefully and report them to the user instead of silently leaving the slot in a broken state.