Repository navigation
v1.0.6 - Bug Fix: Orphan engine process on power uninstall
Overview
Fixed an issue where the engine process would continue running indefinitely after the Kiro power was uninstalled or the MCP proxy exited.
Root cause: The engine's shutdown logic depends on tracking client PIDs via the X-Follower-PID HTTP header. However, this header was only sent during tool calls (via EngineClient), not during the initial startup health check (which used raw requests.get()). If the MCP process exited before any tool call was made, the engine's follower registry stayed empty and the "all followers dead" shutdown condition could never trigger.
Fix:
- The MCP proxy now immediately registers its PID with the engine on startup by calling client.health() through the EngineClient (which sends the PID header).
- Added a 120-second orphan protection timeout: if no follower ever registers after startup, the engine shuts itself down. This is a safety net for edge cases where the client crashes during the registration request itself.