Commit Graph

1 Commits

Author SHA1 Message Date
roboomp 0640b7e3c7 fix(agent): deliver queued steer on empty transcript instead of looping
A steer queued on a session with an empty transcript was undeliverable:
Agent.continue() threw "No messages to continue from" before dequeuing any
steering message, so the RPC idle-drain re-armed continue() on every microtask
(gated only on hasQueuedMessages(), which never cleared) — an unbounded
allocation loop that OOM-killed the process.

continue() now consumes a queued steer/follow-up as the opening turn when the
transcript is empty, mirroring the assistant-tail branch. The queue drains, the
re-arm's hasQueuedMessages() gate goes false, and the loop terminates.

Fixes #6344
2026-07-23 19:02:47 +00:00