Summary
The dangerous command approval prompt (the TUI dialog shown when a potentially dangerous terminal command is detected) has a hardcoded 60-second timeout. When it expires, the command is automatically denied. For users running complex agent workflows — especially with delegation subtasks that trigger approval — 60 seconds is often too short, leading to unnecessary timeouts and denied commands.
Proposal
Read the timeout from config.yaml under approvals.timeout, falling back to 60 seconds when unset:
approvals:
mode: smart
timeout: 120 # seconds for dangerous command approval prompt
Affected locations
tools/approval.py — prompt_dangerous_approval() takes timeout_seconds=60 as a default. Should read from config via a helper like _get_approval_timeout().
hermes_cli/callbacks.py — approval_callback() hardcodes timeout = 60. Should read from CLI_CONFIG.get("approvals", {}).get("timeout", 60).
Why
- Long-running agent tasks (delegation, MCP tool chains) can trigger multiple approval prompts. If the user is AFK or slow to respond, the 60s timeout kills the entire workflow.
- The
clarify callback already reads its timeout from config (CLI_CONFIG.get("clarify", {}).get("timeout", 120)), so this is consistent with existing patterns.
- No behavior change for users who don't set the key — default stays at 60s.
Minimal diff
The change is small (~10 lines): add a _get_approval_timeout() helper in approval.py that reads approvals.timeout from config, and replace the hardcoded 60 in both locations.
Summary
The dangerous command approval prompt (the TUI dialog shown when a potentially dangerous terminal command is detected) has a hardcoded 60-second timeout. When it expires, the command is automatically denied. For users running complex agent workflows — especially with delegation subtasks that trigger approval — 60 seconds is often too short, leading to unnecessary timeouts and denied commands.
Proposal
Read the timeout from
config.yamlunderapprovals.timeout, falling back to 60 seconds when unset:Affected locations
tools/approval.py—prompt_dangerous_approval()takestimeout_seconds=60as a default. Should read from config via a helper like_get_approval_timeout().hermes_cli/callbacks.py—approval_callback()hardcodestimeout = 60. Should read fromCLI_CONFIG.get("approvals", {}).get("timeout", 60).Why
clarifycallback already reads its timeout from config (CLI_CONFIG.get("clarify", {}).get("timeout", 120)), so this is consistent with existing patterns.Minimal diff
The change is small (~10 lines): add a
_get_approval_timeout()helper inapproval.pythat readsapprovals.timeoutfrom config, and replace the hardcoded60in both locations.