The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(clarify): CLI honours agent.clarify_timeout instead of a hidden 120 s cap
izumi0uu9104b25cb935
diff --git a/cli.py b/cli.pyindex 7d3a4d5dee5..93c46b0693d 100644--- a/cli.py+++ b/cli.py@@ -417,7 +417,6 @@ def _cli_config_defaults():"persist_prompts": True, # one-line summary of resolved modal prompts into scrollback"skin": "default",},- "clarify": {"timeout": 120}, # seconds before a clarify prompt auto-proceeds"code_execution": {"timeout": 300, "max_tool_calls": 50},"auxiliary": {"vision": {"provider": "auto", "model": "", "base_url": "", "api_key": ""}},# delegation: empty model/provider = inherit parent; api_key falls back to OPENAI_API_KEYdiff --git a/tests/tools/test_clarify_gateway.py b/tests/tools/test_clarify_gateway.pyindex 218ab3ce96f..f59b07bf827 100644--- a/tests/tools/test_clarify_gateway.py+++ b/tests/tools/test_clarify_gateway.py@@ -234,6 +234,21 @@ class TestClarifyTimeoutResolution:assert cm.resolve_clarify_timeout({"agent": {"clarify_timeout": 900}}) == 900+ def test_cli_defaults_do_not_shadow_agent_clarify_timeout(self):+ """The classic CLI builds its config from ``cli._cli_config_defaults()``; a seeded+ legacy ``clarify.timeout`` there wins over the user's ``agent.clarify_timeout`` in+ the resolver, capping every CLI modal at that value (120 s) while the docs promise+ 3600 s / unlimited. The CLI defaults must leave the legacy key unset."""+ import cli+ from tools import clarify_gateway as cm++ defaults = cli._cli_config_defaults()+ assert (defaults.get("clarify") or {}).get("timeout") is None+ assert cm.resolve_clarify_timeout(defaults) == 3600+ cli._merge_file_config(defaults, {"agent": {"clarify_timeout": 900}})+ assert cm.resolve_clarify_timeout(defaults) == 900++def test_non_positive_preserved_as_unlimited_sentinel(self):"""<= 0 is passed through verbatim — the waiting loops read it as'unlimited', so the resolver must not clamp it to a positive default."""