Raise unusable response limit to five
Set the default consecutive unusable response threshold to five and align the Agent Settings copy, helper DOX, and regression assertion.
Alessandro committed
Aug 1, 2026 at 16:52 UTC
5ff106a2d489d17c2a3b378521a8f29fb29cf77d
4 files changed
+4
-4
helpers/settings.py
+1
-1
@@ -527,7 +527,7 @@ def get_default_settings() -> Settings:
527
agent_profile=get_default_value("agent_profile", "agent0"),
528
agent_knowledge_subdir=get_default_value("agent_knowledge_subdir", "custom"),
529
max_consecutive_unusable_responses=get_default_value(
530
- "max_consecutive_unusable_responses", 2
530
+ "max_consecutive_unusable_responses", 5
531
),
532
timezone=_normalize_timezone_setting(get_default_value("timezone", TIMEZONE_AUTO)),
533
time_format=_normalize_time_format(get_default_value("time_format", TIME_FORMAT_12H)),
helpers/settings.py.dox.md
+1
-1
@@ -65,7 +65,7 @@
65
- Important called helpers/classes observed in the source: `TypeVar`, `files.get_abs_path`, `dotenv.get_dotenv_value`, `opts.insert`, `str.strip`, `_is_valid_timezone`, `str.strip.lower`, `_normalize_timezone_setting`, `SettingsOutput`, `get_default_settings`, `_ensure_option_present`, `_resolve_runtime_timezone`, `get_default_secrets_manager`, `get_settings`, `normalize_settings`, `_load_sensitive_settings`, `settings.copy`, `_write_settings_file`, `reload_settings`, `set_settings`, `initialize_agent`.
66
- Applying settings refreshes active context configs while preserving each subordinate agent's own profile.
67
- Applying settings starts a deferred `MCPConfig.update(...)` with the current `mcp_servers` string when global MCP server settings change.
68
-- `max_consecutive_unusable_responses` defaults to `2` and controls the cost circuit breaker for malformed or repeated main-model outputs.
68
+- `max_consecutive_unusable_responses` defaults to `5` and controls the cost circuit breaker for malformed or repeated main-model outputs.
69
- `ui_control_visibility` stores validated mobile and desktop visibility flags for the project selector, clock, connection status, and right canvas rail; missing or malformed values fall back per device.
70
- Keep request/response, tool, or helper semantics documented here at the same time as source changes.
71
tests/test_unusable_response_loop.py
+1
-1
@@ -85,7 +85,7 @@ def test_nonconsecutive_failure_starts_a_new_recovery_window(monkeypatch):
85
86
def test_general_settings_expose_the_default_failure_limit():
87
settings = get_default_settings()
88
- assert settings["max_consecutive_unusable_responses"] == 2
88
+ assert settings["max_consecutive_unusable_responses"] == 5
89
settings["max_consecutive_unusable_responses"] = 0
90
assert normalize_settings(settings)["max_consecutive_unusable_responses"] == 1
91
webui/components/settings/agent/agent.html
+1
-1
@@ -71,7 +71,7 @@
71
<div class="field-label">
72
<div class="field-title">Consecutive unusable response limit</div>
73
<div class="field-description">
74
- Stop after this many malformed or repeated model responses. The default allows one corrective retry.
74
+ Stop after this many malformed or repeated model responses. The default is 5.
75
</div>
76
</div>
77
<div class="field-control">