recv: None = peek, positive value = opt-in long-poll
old behavior: omitted wait_seconds fell through to the 30s RECV_LONG_POLL_DEFAULT — claude calling 'is there anything in my inbox right now?' between actions blocked the turn for half a minute. flip the semantics: None (or 0) returns immediately, positive value parks up to MAX (180s, unchanged). cleaner 'peek vs wait' distinction; tool descriptions + agent/manager prompts updated to point at the new shape. harness's own serve loops in hive-ag3nt + hive-m1nd relied on the old default for their inbox poll. they now explicitly pass wait_seconds: Some(180) to opt into the full park — same effective behavior as before, just spelled out. retires the matching TODO under Turn loop.
This commit is contained in:
parent
90df2106bf
commit
06af23c8a4
9 changed files with 53 additions and 45 deletions
15
TODO.md
15
TODO.md
|
|
@ -3,21 +3,6 @@
|
|||
Pick anything from here when relevant. Cross-cutting design notes live in
|
||||
[CLAUDE.md](CLAUDE.md); high-level project intro in [README.md](README.md).
|
||||
|
||||
## Turn loop
|
||||
|
||||
- **`recv` with no `wait_seconds` should return immediately.**
|
||||
Today omitting the argument falls through to the 30s
|
||||
default long-poll (`RECV_LONG_POLL_DEFAULT` in
|
||||
`hive-c0re/src/agent_server.rs`); a manager that wants a
|
||||
cheap "anything in the inbox right now?" peek has to
|
||||
explicitly pass `wait_seconds: 0`. Flip the semantics so
|
||||
`None` = no sleep, returning `None` (or the empty inbox
|
||||
shape) right away. The agent opts into the long-poll by
|
||||
setting a positive value. Update both `AgentRequest::Recv`
|
||||
and `ManagerRequest::Recv` handlers + the prompt language
|
||||
in `prompts/{agent,manager}.md`. Tighten the cap (180s)
|
||||
too — only meaningful when the agent is choosing to wait.
|
||||
|
||||
## Permissions / policy
|
||||
|
||||
- **Per-agent send allow-list.** Today any agent can `send` to any
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue