Watch
0
0
Fork
You've already forked hyperhive
0

swarm: a soft context limit per agent, as a percent of the window, applied at turn end

This commit is contained in:
damocles 2026-11-15 15:13:50 +01:00 • committed by mara
commit 1e03979836

View file

@ -164,7 +164,10 @@ The **when** for hyperhive's own policy is a `hive_claude::CompactionPolicy` inj
`turn::make_session` builds a `PercentPolicy` that compacts once the
model-reported context fill reaches `HIVE_COMPACT_WATERMARK_PERCENT`
(default **75%**), falling back to `harness_state::context_window_tokens(model)`
for the window on turns the model didn't report one. `0` disables proactive
for the window on turns the model didn't report one. The swarm can replace
that percent per agent with its `soft_context_percent`
([`inference.md`](../swarm/inference.md)); `turn::SoftLimitPolicy` reads it
for each decision. `0` disables proactive
compaction (the reactive path always applies). The proactive path is
best-effort — a failed checkpoint or `/compact` never fails the turn that
already succeeded. An ACP agent gets the same policy; how it compacts is in