recv: cap batch size at 5, default stays 1 (#2150 clarified)
This commit is contained in:
parent
ee45db6323
commit
78396c8189
6 changed files with 14 additions and 11 deletions
|
|
@ -613,7 +613,7 @@ pub struct RecvArgs {
|
|||
/// Maximum number of messages to pop in this round-trip. Default
|
||||
/// (None) is 1 (single-message behaviour — exactly what you want
|
||||
/// when you're called to drive a turn off the first wake). Pass
|
||||
/// a higher value (capped at 32 server-side) when you've been
|
||||
/// a higher value (capped at 5 server-side) when you've been
|
||||
/// told the inbox has more queued (the wake prompt mentions
|
||||
/// pending count) and want to drain everything in one tool call.
|
||||
/// Once the long-poll wakes up, the call drains up to `max` in
|
||||
|
|
@ -806,7 +806,7 @@ impl AgentServer {
|
|||
`wait_seconds` (capped at 180) to park the turn waiting for new work — incoming \
|
||||
messages wake you instantly, otherwise the call returns empty at the timeout. \
|
||||
That's strictly better than a fixed shell `sleep`. \n\n\
|
||||
**Batch drain**: pass `max: N` (capped at 32) to drain up to N messages in one \
|
||||
**Batch drain**: pass `max: N` (capped at 5) to drain up to N messages in one \
|
||||
round-trip. Use this when the wake prompt told you the inbox has more queued, or \
|
||||
any time you expect a burst — one tool call beats N consecutive single recvs. \
|
||||
`wait_seconds` still applies to the FIRST message; once one arrives the call drains \
|
||||
|
|
|
|||
Loading…
Reference in a new issue