Skip to content

The agent that grows with you

docs(clarify): one clarify timeout for every surface; say where the deadline exemption lives

teknium11b50849d273b
diff --git a/agent/tool_executor.py b/agent/tool_executor.py
index 4ae7b023879..bcb75960c8c 100644
--- a/agent/tool_executor.py
+++ b/agent/tool_executor.py
@@ -856,7 +856,9 @@ def _run_sequential_tool_execution_middleware(
) -> _ManagedToolResult:
"""Run one sequential call on a worker thread under the concurrent executor's deadline.
Interactive tools (``clarify``) own their wait via ``agent.clarify_timeout``; the
- generic deadline would report ``tool_timeout`` while the prompt is still live."""
+ generic deadline would report ``tool_timeout`` while the prompt is still live. They
+ are ``_NEVER_PARALLEL_TOOLS`` and run inline below, before any deadline is armed, so
+ they need no ``_SEQUENTIAL_DEADLINE_EXEMPT_TOOLS`` entry."""
timeout_s = None if function_name in _SEQUENTIAL_DEADLINE_EXEMPT_TOOLS else _resolve_sequential_tool_timeout()
ref = _ToolCallRef(function_name, function_args, effective_task_id, tool_call_id, middleware_trace)
kwargs = dict(ref.middleware_kwargs(), execute=execute, scope_block=scope_block, display_index=display_index)
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.py
index f2e056188a5..950bc388da8 100644
--- a/hermes_cli/config_defaults.py
+++ b/hermes_cli/config_defaults.py
@@ -183,13 +183,13 @@ DEFAULT_CONFIG = {
"verify_on_stop": False,
# Inactivity warning (seconds), once per run before gateway_timeout; no interrupt. 0 = off.
"gateway_timeout_warning": 900,
- # Max seconds the gateway blocks an agent awaiting a clarify-tool reply; then it unblocks
- # with "[user did not respond within Xm]". CLI clarify blocks indefinitely and ignores this.
+ # Max seconds any surface (CLI, TUI/Desktop, messaging gateway) blocks an agent awaiting a
+ # clarify-tool reply; then it unblocks with "[user did not respond within Xm]". 0 or less =
+ # unlimited. Resolved by tools/clarify_gateway.py::resolve_clarify_timeout (a legacy
+ # top-level ``clarify.timeout`` still wins when explicitly set).
# 1h because users step away and a shorter value evicted the entry mid-think so a later
- # button tap hit a dead entry. Lower it to free the running-agent guard sooner.
- # Maximum time (seconds) the gateway will block an agent waiting for a clarify-tool response from
- # the user. Tradeoff: a higher value holds the gateway's running-agent guard longer for a genuinely
- # abandoned prompt — lower it if a single session must free up the guard sooner. See #32762.
+ # button tap hit a dead entry. Tradeoff: a higher value holds the gateway's running-agent
+ # guard longer for a genuinely abandoned prompt — lower it to free the guard sooner. See #32762.
"clarify_timeout": 3600,
# "Still working" status interval (seconds); 0 = off. Lower = faster feedback, more noise;
# 180 catches spinning weak-model runs before users /restart.
diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md
index fd953977bd5..d721ce85429 100644
--- a/website/docs/user-guide/configuration.md
+++ b/website/docs/user-guide/configuration.md
@@ -2817,13 +2817,15 @@ The delegation provider uses the same credential resolution as CLI/gateway start
## Clarify
-Configure how long the gateway waits for a response to a clarifying question. The canonical key is `agent.clarify_timeout` (default `3600` seconds); a legacy top-level `clarify.timeout` is still honored if explicitly set:
+Configure how long Hermes waits for a response to a clarifying question. One value covers every surface — the classic CLI modal, the TUI/Desktop card, and the messaging gateway. The canonical key is `agent.clarify_timeout` (default `3600` seconds; `0` or less = unlimited); a legacy top-level `clarify.timeout` is still honored if explicitly set:
```yaml
agent:
clarify_timeout: 3600 # Seconds to wait for user clarification response (0 or less = unlimited)
```
+When the timeout expires, the agent unblocks with a "user did not respond" sentinel and continues on its own. A clarify prompt is never cut by the generic per-tool deadline (`timeouts.tools.sequential_call`); only `agent.clarify_timeout` bounds the wait.
+
## Context Files (SOUL.md, AGENTS.md)
Hermes uses two different context scopes:
diff --git a/website/docs/user-guide/messaging/discord.md b/website/docs/user-guide/messaging/discord.md
index b3446600d2a..1ff0ef48600 100644
--- a/website/docs/user-guide/messaging/discord.md
+++ b/website/docs/user-guide/messaging/discord.md
@@ -746,7 +746,7 @@ When the agent calls the `clarify` tool — to ask which approach you prefer, ge
Click a numbered button to answer, or click **Other** to type a free-form response (the next message you send in that channel becomes the answer). Open-ended `clarify` calls (no preset choices) skip the buttons and just capture your next message.
-The buttons disable themselves once a choice is made so duplicate clicks don't double-resolve the prompt. Configure the response timeout via `agent.clarify_timeout` in `~/.hermes/config.yaml` (default `600` seconds). If you don't respond within the timeout, the agent unblocks with a sentinel message and adapts rather than hanging.
+The buttons disable themselves once a choice is made so duplicate clicks don't double-resolve the prompt. Configure the response timeout via `agent.clarify_timeout` in `~/.hermes/config.yaml` (default `3600` seconds; `0` or less = unlimited). If you don't respond within the timeout, the agent unblocks with a sentinel message and adapts rather than hanging.
### Prompt layout
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/discord.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/discord.md
index abca42dfe34..a8f8b077997 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/discord.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/discord.md
@@ -694,7 +694,7 @@ discord:
点击编号按钮作答,或点击**其他**输入自由格式的响应(你在该频道中发送的下一条消息将成为答案)。开放式的 `clarify` 调用(没有预设选项)会跳过按钮,直接捕获你的下一条消息。
-按钮在做出选择后会自动禁用,防止重复点击导致重复解析提示。通过 `~/.hermes/config.yaml` 中的 `agent.clarify_timeout` 配置响应超时(默认 `600` 秒)。如果你在超时内没有响应,agent 会以一条哨兵消息解除阻塞并自行调整,而不是一直挂起。
+按钮在做出选择后会自动禁用,防止重复点击导致重复解析提示。通过 `~/.hermes/config.yaml` 中的 `agent.clarify_timeout` 配置响应超时(默认 `3600` 秒;`0` 或更小 = 不限时)。如果你在超时内没有响应,agent 会以一条哨兵消息解除阻塞并自行调整,而不是一直挂起。
## 主频道
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/telegram.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/telegram.md
index 71387c25fa5..f19d9555cd1 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/telegram.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/telegram.md
@@ -1202,7 +1202,7 @@ telegram:
点击按钮回答,或点击 **Other** 输入自由形式的回复(你发送的下一条消息成为答案)。开放式 `clarify` 调用(无预设选项)跳过按钮,直接捕获你的下一条消息。
-通过 `~/.hermes/config.yaml` 中的 `agent.clarify_timeout` 配置响应超时(默认 `600` 秒)。如果你在超时内没有响应,Agent 会以哨兵消息解除阻塞并适应,而不是挂起。
+通过 `~/.hermes/config.yaml` 中的 `agent.clarify_timeout` 配置响应超时(默认 `3600` 秒;`0` 或更小 = 不限时)。如果你在超时内没有响应,Agent 会以哨兵消息解除阻塞并适应,而不是挂起。
## 推送通知音量