Relax absolute tool-count caps; keep only anti-loop guards.

Field turns may legitimately use many distinct CLI/shell calls (e.g. 200 rounds). Drop per-turn call/fail budgets and default short-intent round caps; identical-arg and retry_forbidden blocks remain.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-10 23:29:33 +08:00
parent 9d447b1c51
commit 021ed0cc4f
4 changed files with 25 additions and 266 deletions

View file

@ -1031,6 +1031,10 @@ def test_ops_short_intent_caps_tool_rounds(tmp_path) -> None:
attachments=[],
metadata={},
)
assert gw._resolve_max_tool_rounds(short, base=100) == 8
assert gw._resolve_max_tool_rounds(long, base=100) == 100
assert gw._resolve_max_tool_rounds(admin, base=100) == 100
assert gw._resolve_max_tool_rounds(short, base=200) == 200
assert gw._resolve_max_tool_rounds(long, base=200) == 200
assert gw._resolve_max_tool_rounds(admin, base=200) == 200
store.set_setting("AIA_OPS_SHORT_INTENT_MAX_TOOL_ROUNDS", "12")
assert gw._resolve_max_tool_rounds(short, base=200) == 12
assert gw._resolve_max_tool_rounds(long, base=200) == 200