Skip to content

v0.6.2

Choose a tag to compare

@hueyexe hueyexe released this 25 Mar 04:30
· 83 commits to main since this release

Fix: Lead hangs when teammate messages interrupt active stream

When teammates finished tasks and sent messages back via promptAsync while the lead was busy (processing a tool call, spawning another teammate, etc.), the proxy would cancel the lead's active stream. The lead's current operation was lost and it hung indefinitely.

  • Add busy-session guard to team_message: checks session.status() before calling promptAsync. If the recipient is busy, the message is queued in the DB (delivered=0) instead of interrupting the active stream
  • Add flushPendingMessages helper: batches all pending lead-bound messages into a single promptAsync call when the lead goes idle, avoiding N-1 redundant wake-ups
  • Add handleLeadIdleFlush in the event hook: triggers the flush automatically on lead idle events
  • Revert sequential spawn guidance from v0.6.1 (no longer needed — parallel spawns are safe now)

Also in this release

  • TOCTOU race between status check and delivery is documented and accepted as benign — the idle-flush backstop catches any messages that slip through
  • Flush failure is non-fatal (best effort with .catch()) so the event hook never crashes

Full Changelog: v0.6.1...v0.6.2