| ▲ | ivaivanova 4 hours ago | |||||||
The hooks approach seems much cleaner for real-time. Did you run into any issues with the blocking hooks degrading performance before you switched to background? | ||||||||
| ▲ | simple10 4 hours ago | parent [-] | |||||||
Sort of. It wasn't really noticeable until I did an intentional audit of performance, then noticed the speed improvements. Node has a 30-50ms cold start overhead. Then there's overhead in the hook script to read local config files, make http request to server, and check for callbacks. In practice, this was about 50-60ms per hook. The background hook shim reduces latency to around 3-5ms (10x improvement). It was noticeable when using agent teams with 5+ sub-agents running in parallel. But the real speed up was disabling all the other plugins I had been collecting. It piles up fast and is easy for me to forget what's installed globally. I've also started periodically asking claude to analyze it's prompts to look for conflicts. It's shockingly common for plugins and skills to end up with contradictory instructions. Opus works around it just fine, but it's unnecessary overhead for every turn. | ||||||||
| ||||||||