Skip to content

✨(approvals): make dangerous command approval timeout configurable#3766

Closed
acsezen wants to merge 1 commit intoNousResearch:mainfrom
acsezen:feat/configurable-approval-timeout
Closed

✨(approvals): make dangerous command approval timeout configurable#3766
acsezen wants to merge 1 commit intoNousResearch:mainfrom
acsezen:feat/configurable-approval-timeout

Conversation

@acsezen
Copy link
Copy Markdown
Contributor

@acsezen acsezen commented Mar 29, 2026

Summary

  • Read approvals.timeout from config.yaml instead of hardcoding 60 seconds
  • Applies to both the fallback CLI prompt (tools/approval.py) and the TUI prompt_toolkit callback (hermes_cli/callbacks.py)
  • Default remains 60s when unset — no behavior change for existing users

Motivation

When running complex agent workflows with delegation subtasks, the 60s timeout is often too short — the prompt expires and the command is denied before the user can respond. The clarify callback already reads its timeout from config, so this follows the same pattern.

approvals:
  mode: smart
  timeout: 120

Test plan

  • All 95 existing approval tests pass (test_approval.py + test_cli_approval_ui.py)
  • Manual: set approvals.timeout: 10 and verify the countdown matches
  • Manual: remove approvals.timeout and verify 60s default

Closes #3765

Read `approvals.timeout` from config.yaml (default 60s) instead of
hardcoding 60 seconds in both the fallback CLI prompt and the TUI
prompt_toolkit callback.

Follows the same pattern as `clarify.timeout` which is already
configurable via CLI_CONFIG.

Closes NousResearch#3765
@teknium1
Copy link
Copy Markdown
Contributor

Merged via #3886. Cherry-picked with authorship preserved, plus added timeout: 60 to DEFAULT_CONFIG for discoverability. All 116 approval tests pass. Thanks @acsezen!

@teknium1 teknium1 closed this Mar 30, 2026
@acsezen acsezen deleted the feat/configurable-approval-timeout branch April 3, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: make dangerous command approval timeout configurable

2 participants