agentd daemon cannot send to existing persistent agents after restart

t-776·WorkTask·
·
·
Created1 week ago·Updated1 week ago·pipeline runs →

Dependencies

Description

Edit

After restarting system agentd, HTTP POST /agents/<id>/send returns 404 'Agent not found' for persistent agents that are already running as systemd user units. Root cause appears to be daemon send path relying only on in-memory dsRunning map, which is empty on startup and not hydrated from existing units/DB. This breaks Ava/orchestrator send until agents are recreated under current daemon process. Need startup reconciliation: discover active agentd-agent@ units, rebuild dsRunning handles where possible or route send via FIFO/systemd path without requiring in-memory process handles.

Git Commits

4427e278agentd: deploy hermetically via deployer
Coder Agent8 days ago4 files

Timeline (6)

🔄[human]Open → InProgress1 week ago
💬[human]1 week ago

Fixed as part of t-775 follow-up in Omni/Agentd/Daemon.hs. sendToAgent now falls back to sendPersistentAgent (FIFO/systemctl-backed path) when run ID is not present in in-memory dsRunning map after daemon restart. stopHandler now falls back to stopPersistentAgent similarly. Verified with live agentd after deployer restart: POST /agents/intent-coder/send now returns 200 {"status":"sent"} after daemon restart (previously 404 Agent not found).

🔄[human]InProgress → Review1 week ago
💬[human]1 week ago

Included in commit 4427e278 via daemon send/stop fallback paths when dsRunning is empty after restart.