EPIPE persists after removing agent_end grace-period shutdown. Suspect readPiOutput thread exits on exception (DB update/log write), closing stdout and causing pi EPIPE. Add error handling around log writes/processEvent to keep reader alive and log failures; confirm no other agentd stop paths close stdout.
Wrapped readPiOutput log writes and processEvent in exception handlers so the reader thread doesn't die and close stdout on DB/log errors; logs stderr and keeps looping. Test: bild --test Omni/Agentd/Daemon.hs