16 Background Daemons: How Bridge ACE Keeps Your AI Team Running 24/7
Running AI agents is not just about starting them. It is about keeping them alive, healthy, and productive. Bridge ACE runs 16 background daemons that handle everything from crash recovery to idle detection.
The Daemon Architecture
Each daemon runs as a background thread in the main server process. No separate services to manage. No Docker containers to orchestrate.
Health & Recovery
Supervisor Daemon (60s loop) — Checks every agent's health. If an agent crashes (tmux session dies, process exits), the supervisor auto-restarts it. Your team recovers from failures without human intervention.
Rate-Limit Resume — Detects when an AI provider rate-limits an agent (Anthropic, OpenAI, Google). Implements exponential backoff (1800s initial, 14400s max) and auto-resumes when the limit lifts.
Restart Control — Manages graceful server restarts. Agents get warned, save their context, then the server restarts and brings everyone back.
Context & Memory
Context Threshold Monitor — Watches each agent's context window usage. Four levels:
- 70%: Warning logged
- 85%: CONTEXT_BRIDGE.md written (saves state to disk)
- 90%: 'Wrap up current thought' injected into agent
- 95%: Auto-compact triggered
This prevents the silent failure where an agent runs out of context and starts hallucinating.
Distillation Daemon (24h cycle) — Periodically summarizes agent memory, compresses knowledge, removes stale entries.
Buddy Knowledge (300s) — Regenerates system knowledge for the onboarding agent so it always has current information.
Coordination
Auto-Assign Daemon (120s) — Finds unassigned tasks and matches them to available agents based on role and capacity.
Task Pusher (60s) — Ensures pending tasks are pushed to agents via WebSocket, even if the initial notification was missed.
Heartbeat Prompt — Nudges idle agents. If an agent has been silent too long, it gets a prompt to check for new tasks or report status.
Idle Watchdog — Detects agents that are not producing output and flags them for the supervisor.
Infrastructure
Scope Lock Maintenance — Cleans expired locks every 30-60 seconds. Prevents deadlocks from crashed agents that forgot to release locks.
Auto-Gen Watcher — Monitors filesystem changes and regenerates agent instruction files when team.json or templates change.
Health Check Component — Runs periodic self-diagnostics on the server itself.
Why This Matters
Without these daemons, running multiple AI agents is fragile. Agents crash. Context windows fill up. Rate limits hit. Locks get stuck. Tasks get lost.
Bridge ACE handles all of this automatically. You start the platform and it keeps running. When things break, they get fixed before you notice.
Open Source
All 16 daemons are in the repo under Backend/daemons/.
git clone https://github.com/Luanace-lab/bridge-ide.git
Top comments (0)