refactor(agents): use loop detection switch for post-compaction guard

This commit is contained in:
Peter Steinberger
2026-05-05 01:12:32 +01:00
parent dbb2299e38
commit 5dfaed1846
13 changed files with 60 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
a963f7242f75fbc137a7891b8056c199b42eeb8f4887aeaaa079bff6394feb89 config-baseline.json
51f525cfffa40659d6273e56705e91f3cb1255b217dadab59c32f77e0f770b37 config-baseline.core.json
21a7c6f83f21d2de3b580fbcc5e9e507bc43b97714a338627caff089cb8ff29d config-baseline.json
06f12009f24c2120fb572c808a0b7858d1c52c2ef2386e0fa6244739b2e67680 config-baseline.core.json
cd7c0c7fb1435bc7e59099e9ac334462d5ad444016e9ab4512aae63a238f78dc config-baseline.channel.json
9832b30a696930a3da7efccf38073137571e1b66cae84e54d747b733fdafcc54 config-baseline.plugin.json

View File

@@ -96,8 +96,8 @@ This is a separate code path from the global `tools.loopDetection` detectors. It
{
tools: {
loopDetection: {
enabled: true, // existing master switch; set false to disable loop guards
postCompactionGuard: {
enabled: true, // default: true
windowSize: 3, // default: 3
},
},
@@ -105,7 +105,6 @@ This is a separate code path from the global `tools.loopDetection` detectors. It
}
```
- `enabled`: master switch for the guard.
- `windowSize`: number of post-compaction tool calls during which the guard stays armed _and_ the count of identical (tool, args, result) triples that triggers an abort.
The guard never aborts when results are changing, only when results are byte-identical across the window. It is intentionally narrow: it fires only in the immediate aftermath of a compaction-retry.