Problem: Session lockup on cold start — the main session hangs at startup with "processing" shown but no active run, causing Slack to disconnect and reconnect in a loop.
Root cause identified:
bundle-tools: 5039mson every cold session start blocks the event loop- During this block, Slack socket ping (30s default) times out
- Reconnect loop deadlocks with the stuck event loop
- WAL checkpoint fails because the session is frozen mid-heartbeat
Evidence from logs:
eventLoopDelayMaxMs=32866on cold startup (spike from 17s model boot + 34s bundle-tools)- Normal P99 is 32-110ms after warmup
- Session counter: 91 sessions on main agent
Current workaround: Restart gateway from Control UI instead of from inside the session. Hot reload of browser plugin works fine.
Question: Is there a way to either:
- Reduce the
bundle-toolsblocking time on cold start, OR - Increase the Slack socket ping timeout to be longer than the worst-case event loop delay, OR
- Add a WAL checkpoint before the cold-start bottleneck so recovery works after a crash?
Happy to provide more details or test any fixes.