feat: increase default approvals.gateway_timeout from 300s to 1800s - #47503
kiwipaulrob wants to merge 1 commit into
Conversation
|
Thanks for identifying the email approval-wait problem. The current implementation needs a re-scope before it can be salvaged. Problems
Suggested changes
This is an automated hermes-sweeper review. |
|
Thanks for the review. The history in commit |
Raises the default approval timeout for all surfaces (CLI, gateway, email) from 60 seconds to 5 minutes, so email-based approval round-trips have enough time to complete. This addresses review feedback on PR NousResearch#47503 by replacing the separate approvals.gateway_timeout config key with a simple default increase on the single canonical approvals.timeout setting.
f9478d5 to
59cfa7e
Compare
|
Re-scoped as promised:
This gives all approval surfaces (CLI, gateway, email) the longer wait uniformly with a single +1/-1 change. |
|
Thank you @kiwipaulrob — you proposed this exact change ( This was resolved on main today in #68597 with the same 300s default, along with aligned fallback sites ( Closing as resolved-on-main. Appreciated! |
Summary
The default approval timeout for gateway/messaging platforms (
approvals.gateway_timeout) is 300 seconds (5 minutes), which is too short for email round-trips. This PR changes the default to 1800 seconds (30 minutes), matchingagent.gateway_timeout, and adds the option to the documented DEFAULT_CONFIG.Background
approvals.gateway_timeoutcontrols how long the agent thread waits for a user to respond with/approveor/denyon messaging and email platforms. Its current effective default is 300 seconds, falling back from two places:tools/approval.pyline 1289:_get_approval_config().get("gateway_timeout", 300)tools/approval.pyline 1296:except (ValueError, TypeError): timeout = 300(defensive fallback)Why 300s is wrong for email
The 300s value works fine for instant messaging (Telegram, Discord, Slack) where users typically respond in seconds. But email is fundamentally different — it is an asynchronous, intermittent communication channel. Users check email on their own schedule, not on the agent's timer. A typical email round-trip (Hermes sends email → user reads it at their next check → user composes /approve reply → Hermes polls IMAP → receives it) routinely takes 5–30 minutes.
The normal-reply trap (Issue #27352)
Sending a normal chat message while Hermes is waiting for approval does NOT resolve the pending event or extend the timeout. Only explicit
/approveor/denycommands release the pending approval. Raising the default to 1800s provides breathing room.Changes
1.
hermes_cli/config.py— Addgateway_timeoutto DEFAULT_CONFIGAdds
"gateway_timeout": 1800with a comment referencing Issue #27352.2.
tools/approval.py— Raise the fallback default from 300 to 1800Two fallback defaults:
300→1800, update comment from "5 min" to "30 min".3.
gateway/run.py— Update dormant constant to match_APPROVAL_TIMEOUT_SECONDS = 300→18004.
website/docs/user-guide/configuration.md— Document the optionAdds
gateway_timeoutdocumentation with email-specific guidance.Related Issues