The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
Revert "docs: approvals.timeout and agent.clarify_timeout are the messaging-platform deadlines"
teknium1a743ca54c3dd
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.pyindex e4ba6148937..1196da7252d 100644--- a/hermes_cli/config_defaults.py+++ b/hermes_cli/config_defaults.py@@ -223,10 +223,10 @@ 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 a messaging platform blocks an agent awaiting a clarify-tool reply; then it- # unblocks with "[user did not respond within Xm]". 0 or less = unlimited. CLI, TUI and- # Desktop wait until answered. Resolved by tools/clarify_gateway.py::resolve_clarify_timeout- # (a legacy top-level ``clarify.timeout`` still wins when explicitly set).+ # 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. 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.@@ -1662,9 +1662,8 @@ DEFAULT_CONFIG = {# platform (webhook, msgraph_webhook, api_server; no /approve channel) hits one.# deny blocks instantly so the agent finds another way instead of waiting out the# timeout and failing closed.- # timeout: seconds before an unanswered prompt fails closed on messaging platforms, ACP and- # approval transport plugins; CLI, TUI and Desktop wait until answered. 60s proved too- # tight for Telegram/Discord push notifications, hence 300.+ # timeout: seconds before an unanswered prompt fails closed (CLI and gateway). 60s+ # proved too tight for Telegram/Discord push notifications, hence 300."approvals": {# single_query_mode — what to do when a single-query (-q) session hits a dangerous command. -q runs# export HERMES_INTERACTIVE=1 (for interactive sudo prompts) but have NO user waiting to answerdiff --git a/tools/clarify_gateway.py b/tools/clarify_gateway.pyindex ff53225cb2a..ec84a97dc7f 100644--- a/tools/clarify_gateway.py+++ b/tools/clarify_gateway.py@@ -261,9 +261,9 @@ def clear_session(session_key: str) -> int:def resolve_clarify_timeout(config: dict) -> int:- """Clarify timeout (seconds) on messaging platforms: legacy ``clarify.timeout`` if explicitly set,- else ``agent.clarify_timeout``, else 3600. CLI, TUI and Desktop never time a clarify out — the user- is at the screen it is painted on. ``<= 0`` is kept verbatim (unlimited); non-numeric -> 3600."""+ """Clarify timeout (seconds): legacy ``clarify.timeout`` if explicitly set, else+ ``agent.clarify_timeout``, else 3600 — the single source of truth for every surface+ (gateway, CLI, TUI). ``<= 0`` is kept verbatim (unlimited); non-numeric -> 3600."""raw = (config.get("clarify") or {}).get("timeout")if raw is None:raw = (config.get("agent") or {}).get("clarify_timeout", 3600)diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.mdindex 4cb45d75d64..16eec2d448c 100644--- a/website/docs/user-guide/configuration.md+++ b/website/docs/user-guide/configuration.md@@ -2986,14 +2986,14 @@ The delegation provider uses the same credential resolution as CLI/gateway start## Clarify-Configure how long Hermes waits for a response to a clarifying question on messaging platforms. The classic CLI modal and the TUI/Desktop card have no deadline — they wait until you answer, interrupt the turn, or close the session. 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:+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:```yamlagent:- clarify_timeout: 3600 # Seconds a messaging platform waits for a clarification reply (0 or less = unlimited)+ clarify_timeout: 3600 # Seconds to wait for user clarification response (0 or less = unlimited)```-When the timeout expires, the agent unblocks with `"outcome": "timed_out"` (answers the user already locked are kept) and continues on its own. A clarify prompt is never cut by the generic per-tool deadline (`timeouts.tools.sequential_call`).+When the timeout expires, the agent unblocks with `"outcome": "timed_out"` (answers the user already locked are kept) 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)diff --git a/website/docs/user-guide/features/acp.md b/website/docs/user-guide/features/acp.mdindex ababe7c8af5..dff4914f54b 100644--- a/website/docs/user-guide/features/acp.md+++ b/website/docs/user-guide/features/acp.md@@ -377,7 +377,7 @@ options exist on the wire but never reach a human. Buzz Desktop does this, sotreat that path as unattended execution regardless of your `approvals` setting.On timeout or error, the approval bridge denies the request. The wait is-`approvals.timeout` from `config.yaml` (default 300 s), the same knob messaging+`approvals.timeout` from `config.yaml` (default 300 s), the same knob the CLI andgateway prompts use — raise it if your editor keeps approval cards open longer.### Session-scoped edit auto-approvaldiff --git a/website/docs/user-guide/security.md b/website/docs/user-guide/security.mdindex 4e05fed1672..f15a4cc4f30 100644--- a/website/docs/user-guide/security.md+++ b/website/docs/user-guide/security.md@@ -45,7 +45,7 @@ The full set of keys:| Key | Default | What it controls ||---|---|---|| `mode` | `smart` | Approval policy for dangerous shell commands — see the table below. |-| `timeout` | `300` | Seconds Hermes waits for an approval reply on messaging platforms, ACP and approval transport plugins before timing out. The CLI, TUI and Desktop wait until you answer. |+| `timeout` | `300` | Seconds Hermes waits for an approval reply before timing out. || `cron_mode` | `deny` | How [cron jobs](./features/cron.md) behave headlessly when they trigger a dangerous-command prompt. `deny` blocks the command (the agent must find another path); `approve` auto-approves everything in cron context. || `single_query_mode` | `deny` | How one-shot [`hermes chat -q`](./cli.md) sessions behave when they trigger a dangerous-command prompt. A `-q` session runs a single turn and exits with no user waiting to answer prompts; `deny` blocks the command (the agent must find another path), `approve` auto-approves everything in single-query context. Mirrors `cron_mode`. || `unattended_mode` | `deny` | How sessions on unattended programmatic platforms (webhook, msgraph_webhook, api_server) behave when they trigger a dangerous-command prompt. These surfaces have no human who can answer `/approve`, so instead of blocking for the full approval timeout, `deny` blocks the command instantly (the agent must find another path) and `approve` auto-approves everything in unattended context. Mirrors `cron_mode`. |@@ -185,9 +185,7 @@ Deny rules are a shell-command policy, not a complete shell interpreter or an OS### Approval Timeout-In the CLI, the TUI and the Desktop app an approval prompt has no deadline: it stays up until you answer it, interrupt the turn (Ctrl+C / Stop), or close the session. Nothing runs while it waits.--On messaging platforms (and in ACP editors and approval transport plugins) the user has a configurable amount of time to respond. If no response is given within the timeout, the command is **denied** by default (fail-closed).+When a dangerous command prompt appears, the user has a configurable amount of time to respond. If no response is given within the timeout, the command is **denied** by default (fail-closed).An expired prompt cannot be reopened: the pending entry is discarded and the agent is told not to retry on its own within that turn. To run the operation after all, send a new message asking for it (for example "go ahead and run that now") — the agent issues a fresh tool call, which raises a fresh approval card, and a "once" approval applies only to that call. A timeout is not counted as a denial, so asking again is never penalized.