swarm: set the fresh-session threshold per agent
This commit is contained in:
parent
49ee678117
commit
5175d3663e
1 changed files with 154 additions and 32 deletions
|
|
@ -29,10 +29,17 @@ swarmctl agent inference clear iris
|
|||
dialog; `set` has no flag for it either. It's the percent of the model's
|
||||
context window at which the agent compacts at the end of a turn, in place of
|
||||
the harness's own 75%: 20 on a 1M window compacts once the context passes
|
||||
200k. A turn can still run past it, and it changes nothing else (the idle
|
||||
autoreset, the context shown in the UI). It's a whole number from 5 to 100;
|
||||
200k. A turn can still run past it, and it changes nothing else (the
|
||||
context shown in the UI). It's a whole number from 5 to 100;
|
||||
unset keeps the harness's own watermark
|
||||
([`claude-invocation.md`](../turn-loop/claude-invocation.md)).
|
||||
- You set the fresh-session threshold, `fresh_session_percent`, with it: the
|
||||
percent of the context window above which a turn that finds the prompt cache
|
||||
cold starts a fresh session instead of resuming, in place of the harness's
|
||||
own 50%. It's a whole number from 5 to 100, and not above the soft limit when
|
||||
both are set, since the agent compacts at the soft limit and the context would
|
||||
never reach a higher threshold; the controller refuses a pair that crosses.
|
||||
`set` has no flag for it either, and the dialog edits both on one slider.
|
||||
- `get` shows each field, naming the unset ones (or says the swarm sets
|
||||
nothing for the agent), and then the model and effort the agent reports
|
||||
running on, each with where it comes from.
|
||||
|
|
@ -54,6 +61,7 @@ effort: (not set; the agent's own)
|
|||
subagent_models: (not set; the agent's own)
|
||||
max_subagents: (not set; no cap)
|
||||
soft_context_percent: (not set; the harness's own watermark)
|
||||
fresh_session_percent: (not set; the harness's own half)
|
||||
running model: opus (swarm)
|
||||
running effort: medium (local_file)
|
||||
```
|
||||
|
|
@ -103,7 +111,8 @@ which swarm-controller alone writes:
|
|||
"effort": "high",
|
||||
"subagent_models": ["haiku", "sonnet"],
|
||||
"max_subagents": 3,
|
||||
"soft_context_percent": 20
|
||||
"soft_context_percent": 20,
|
||||
"fresh_session_percent": 10
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -130,7 +139,9 @@ in-memory model or effort without writing `hyperhive-model` or
|
|||
|
||||
The same loop hands `soft_context_percent` to the Bus
|
||||
(`set_soft_context_percent`), which the compaction policy reads when it decides
|
||||
at turn end; a key with no limit, or no key, clears it on the next read.
|
||||
at turn end, and `fresh_session_percent` (`set_fresh_session_percent`), which
|
||||
the pre-turn auto-reset reads; a key with no limit, or no key, clears it on the
|
||||
next read.
|
||||
|
||||
The subagent daemon (`hive-subagent-mcp`'s `swarm_models`) reads
|
||||
`subagent_models` and `max_subagents` with the same direct get, under the
|
||||
|
|
|
|||
Loading…
Reference in a new issue