feat: keep the main chat responsive while subagents run
The main session and subagents share the same model backend; when that backend serializes requests (cloud rate limits or a local server), subagent streams queue the main chat. Adds two config knobs: - agent_concurrency (default 3): a semaphore in AgentTree.start caps how many subagent sessions stream simultaneously (slot is released on completion, timeout, or setup error so failures cannot deadlock the queue). - subagent_model (optional): routes spawned agents to a different model or backend, e.g. ollama/gemma4:e4b, so subagents never contend with the main session at all. Wired through the spawn tool, the main-session tools, and the per-agent runtime tools. Documents both in .hypothesis-machine.example.yaml and adds a concurrency-cap test (43 tests passing, tsc clean).
This commit is contained in:
@@ -34,6 +34,11 @@
|
||||
- Added a live subagent dashboard: a TUI widget above the editor shows the
|
||||
research run id, loop status, iteration, active agents with elapsed time,
|
||||
and recently finished agents (updated every 1.5 s, hidden when idle).
|
||||
- Subagents no longer stall the main chat on serial model backends: new
|
||||
`agent_concurrency` (default 3) caps how many subagent sessions stream at
|
||||
once, and optional `subagent_model` routes subagents to a different
|
||||
model/backend (e.g. a local Ollama model) so they never contend with the
|
||||
main session.
|
||||
|
||||
## 0.1.1 — 2026-07-31
|
||||
|
||||
|
||||
Reference in New Issue
Block a user