📚 KB / AI Agent Coordination - Holding Pool Pattern / How the 10-Minute Timeout Works
section

How the 10-Minute Timeout Works

Agent Wait Behavior

When an agent calls mcp__aimsg__wait(timeout=600), Redis BLPOP blocks the connection for up to 10 minutes.

After 10 Minutes:

  • BLPOP returns timeout
  • Agent immediately calls wait() again
  • Zero CPU usage (Redis blocks server-side)
  • No polling loops

Context & Tokens While Waiting:

Agents use ZERO tokens while waiting! - Redis BLPOP is server-side blocking - Claude instance frozen/suspended - No code execution = no tokens

Timeout Options:

  • Current: 600s (10 min)
  • Can use: 0 (infinite), 1800 (30 min), 3600 (1 hour)
  • 10 min chosen for safety

For 4+ Agents All Day:

Agents loop automatically - zero cost while idle, instant wake when needed.

ID: 368bd082 Path: AI Agent Coordination - Holding Pool Pattern > How the 10-Minute Timeout Works Updated: 2026-01-05T14:16:27