diff --git a/hive-runtime/src/acp/rpc.rs b/hive-runtime/src/acp/rpc.rs index 46b47a062..ddb9ba347 100644 --- a/hive-runtime/src/acp/rpc.rs +++ b/hive-runtime/src/acp/rpc.rs @@ -207,9 +207,12 @@ impl Drop for Connection { } } -/// How many items wait for the harness before the oldest news is dropped. A -/// turn drains the queue as it goes, so only an agent that talks while no turn -/// runs gets near this; its items are thrown away at the next prompt anyway. +/// How many items wait for the harness before new ones are dropped. A turn +/// drains the queue as it goes, so only an agent that talks while no turn runs +/// gets near this; its items are thrown away at the next prompt anyway. Keeping +/// the oldest and dropping the newest means a sink that stalled mid-turn for +/// this many items would lose the latest output; that is the right side to +/// lose for the idle case this bounds. const INCOMING_CAP: usize = 4096; /// The sending half of the agent's output queue. A full queue drops the new @@ -230,7 +233,7 @@ impl Feed { if !self.full.swap(true, Ordering::Relaxed) { tracing::warn!( cap = INCOMING_CAP, - "ACP agent output is not being read; dropping what it sends until a turn drains it" + "ACP agent output is not being read; dropping what it sends once the queue is full (logged once per connection)" ); } true