feat(gateway): make still-working heartbeats configurable - #7446
feat(gateway): make still-working heartbeats configurable#7446thesammygit wants to merge 72 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds configuration for the gateway’s long-running “⏳ Still working...” heartbeat so users can tune or disable it globally and per messaging platform, while preserving the existing default cadence (600s) when unset.
Changes:
- Add
display.still_working_interval(global) anddisplay.still_working_overrides(per-platform) with disable semantics for0/false/off. - Wire the configured interval into the gateway’s long-running heartbeat loop.
- Document the new keys and add focused tests for config-loading behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
gateway/run.py |
Loads configurable heartbeat interval from config.yaml and uses it to schedule/disable periodic “still working” messages. |
hermes_cli/config.py |
Adds the new display keys to the default managed config structure. |
tests/gateway/test_still_working_notifications.py |
Adds unit tests covering interval parsing, disable values, and override inheritance behavior. |
website/docs/user-guide/messaging/index.md |
Documents how to configure long-running agent heartbeats in the messaging gateway guide. |
website/docs/user-guide/configuration.md |
Adds the new config keys to the display section and documents global + per-platform behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ### Long-running agent heartbeats | ||
|
|
||
| When an agent turn itself runs for a long time (for example deep research, delegation, or many tool calls), the gateway can send periodic `⏳ Still working...` heartbeats. Control this with `display.still_working_interval`: |
| _iter_n = _act.get("api_call_count", 0) | ||
| _iter_max = _act.get("max_iterations", 0) | ||
| if _cur_tool: | ||
| _status_detail = f" — iteration {_iter_n}/{_iter_max}, running: {_cur_tool}" |
|
addendum after another local verification pass on macos 26.3 / python 3.11.14. what i verified:
full-suite context from the same machine:
why i do not currently think this pr is introducing additional meaningful regressions in the area it touches:
in other words: i did find one patch-local issue, fixed it, and after that i have not found evidence of further deterministic regressions tied to this change. |
|
clarification on the local full-suite numbers, because looking only at on the same machine:
so while this branch shows 8 more for the 12 tests that appeared as branch-only
so i do not currently have evidence that this PR is introducing additional meaningful deterministic regressions beyond the one heartbeat-detail fallback issue i already fixed. |
|
resolved the merge conflict by merging current origin/main into this branch and reconciling the touched gateway/config/docs areas. what changed in the conflict resolution pass:
local verification after the merge commit (
pr is no longer in a merge-conflict state on my side. |
|
resolved the new origin/main merge conflict and pushed a follow-up merge commit. what i changed:
validation:
|
|
resolved the current origin/main merge conflict and pushed a follow-up merge commit. what i changed:
validation:
|
|
merged current origin/main into this branch to keep the heartbeat/config/docs/test area current with main. what changed:
validation:
|
|
merged current origin/main into this branch to keep the heartbeat/config/docs/test area current with main. what changed:
validation:
|
|
merged current origin/main into this branch and fixed one stale test expectation from the touched config/test area. what changed:
validation:
|
|
merged current origin/main into this branch to keep the heartbeat/config/docs/test area current with main. what changed:
validation:
|
|
merged current origin/main into this branch to keep the heartbeat/config area current with main. what changed:
validation:
|
|
merged current origin/main into this branch to keep the heartbeat/config/docs/test area current with main. what changed:
validation:
|
|
merged current origin/main into this branch to keep the heartbeat/config/docs/test area current with main. what changed:
validation:
|
|
merged current origin/main into sam/signal-heartbeat-config to keep the gateway heartbeat/config/docs/tests branch current after origin/main moved gateway/run.py, hermes_cli/config.py, and website/docs/user-guide/messaging/index.md. what changed:
validation:
|
|
merged current origin/main into sam/signal-heartbeat-config to keep the gateway heartbeat/config/docs/tests branch current after origin/main moved the pr-touched files. what changed:
validation:
|
|
merged current origin/main into sam/signal-heartbeat-config to keep the gateway heartbeat/config/docs/tests branch current after origin/main moved the pr-touched files. what changed:
validation:
|
|
merged current origin/main into sam/signal-heartbeat-config to keep the gateway heartbeat/config/docs/tests branch current after main touched overlapping files. validation: |
|
cron watcher update:
|
|
maintenance update: merged current validation: pushed merge commit |
|
merged current validation: |
|
Thanks for carrying the per-platform cadence idea through repeated gateway/config changes. As @alt-glitch noted, #8572 already landed the global interval; current main also already supports per-platform heartbeat suppression via Problems
Suggested changes
This is an automated hermes-sweeper review. |
what
display.still_working_intervalfor gateway long-running heartbeat cadencedisplay.still_working_overridesfor per-platform control (for example: disable Signal, shorten Telegram)0,false, oroffas disablewhy
Signal users can already quiet tool progress with
display.tool_progress_overrides, but the separate hardcoded 10-minute⏳ Still working...heartbeat remained noisy. This patch makes that heartbeat configurable without changing existing defaults.related context:
how to test
targeted tests
python -m pytest tests/gateway/test_still_working_notifications.py tests/gateway/test_background_process_notifications.py tests/gateway/test_gateway_inactivity_timeout.py -q36 passed in 16.09sfull suite
python -m pytest tests/ -v9956 passed, 34 skipped, 55 failed, 35 errors in 164.68sorigin/mainworktree on the same machine:9896 passed, 34 skipped, 45 failed, 94 errors in 147.76smainis therefore not green in this environment either; the changed-path targeted tests above passmanual verification
_run_agentpath locally with a long-running fake agentdisplay.still_working_interval: 0.05, Telegram emitted still-working heartbeatsdisplay.still_working_overrides.signal: off, Signal emitted zero still-working heartbeatsplatforms tested
cross-platform impact