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?
Good to know background hooks make that much of a difference. How are you handling the case where multiple agent teams are writing to the same jsonl files simultaneously?
Ha, I just shipped an open source library using the Anthropic API. The way I solved the cost concern was by having users bring their own API key. Zero infra cost on my end and they pay for what they use.