v0.9.3
What's New
π Stagnation rule now tracks unique paths, not just tools (F6)
The loop detection rule's stagnation check used to count unique TOOL
names only. This blocked legitimate batch work β e.g. scaffolding 10
files where the agent only uses write+bash would trip the
stagnation block after 14 calls.
The check now tracks the distinct-paths ratio of recent calls. If
β₯70% of calls touch distinct paths, the call is allowed (it's batch
progress, not a loop).
Behavior matrix
| Pattern | Action |
|---|---|
| 14 write() calls, 14 distinct files | β ALLOW (scaffolding) |
| 14 write() calls, all to same file | β BLOCK (real stagnation) |
| 10 calls, 8 unique paths + 2 repeats | β ALLOW (borderline batch) |
| 10 calls, 3 unique paths | β BLOCK (genuine loop) |
Path identity is extracted from path / file_path / cwd /
first arg β handles all common tool dialects.
π§ͺ 5 new regression tests
TestStagnationBatchWorkRefinementβ covers the new distinct-paths logictest_scaffolding_many_distinct_files_allowedβ F6 baseline regressiontest_repeated_path_stagnation_blockedβ ensures real loops still firetest_mixed_some_repeats_allowed_at_thresholdβ borderline casetest_path_extraction_supports_file_path_argβ alternate arg nametest_call_history_does_not_leak_between_rulesβ isolation
π οΈ Integration test script
Added tests/integration-subagent-smoke.sh for end-to-end verification
spawning a real subagent through the proxy.