v5.4.3 (2025-11-10)
Breaking Changes: None (patch version)
Bug Fixes:
- Fixed PM2 race condition between watch mode and PostToolUse hook
- Eliminated
TypeError: Cannot read properties of undefined (reading 'pm2_env')errors - Reduced unnecessary worker restarts (39+ restarts → minimal)
Technical Details:
- Removed PM2 restart logic from
ensureWorkerRunning()insrc/shared/worker-utils.ts - PM2 watch mode now exclusively handles worker restarts on file changes
- Function now only checks worker health via HTTP endpoint and provides clear error messaging
- Removed unused imports and helper functions (
execSync,getPackageRoot,waitForWorkerHealth)
Files Modified:
src/shared/worker-utils.ts(40 deletions, 14 additions)- All built hooks and worker service (rebuilt from source)
Impact: This fix eliminates error spam in hook output while maintaining full functionality. Users will see cleaner output and fewer unnecessary restarts.
Upgrade Notes: No action required. PM2 watch mode will automatically restart the worker on plugin updates.