Watch
0
0
Fork
You've already forked hyperhive
0

swarm: set the fresh-session threshold per agent

This commit is contained in:
iris 2026-11-16 10:50:13 +01:00
commit 5175d3663e

View file

@ -21,7 +21,8 @@
//! start, the agent runs on its local values.
//!
//! `subagent_models` and `max_subagents` are not read here. `soft_context_percent`
//! is handed to the Bus, which the compaction policy reads at turn end.
//! is handed to the Bus, which the compaction policy reads at turn end, and so is
//! `fresh_session_percent`, which the pre-turn auto-reset reads.
use std::time::Duration;
@ -147,6 +148,9 @@ pub async fn run(bus: Bus) {
target
.bus
.set_soft_context_percent(read.soft_context_percent);
target
.bus
.set_fresh_session_percent(read.fresh_session_percent);
}
tokio::time::sleep(POLL_INTERVAL).await;
}
@ -234,6 +238,7 @@ mod tests {
subagent_models: None,
max_subagents: None,
soft_context_percent: None,
fresh_session_percent: None,
}
}