fix(gateway): show iteration progress and idle time in /status - #43993
fix(gateway): show iteration progress and idle time in /status#43993LifeJiggy wants to merge 1 commit into
Conversation
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Looks Good
- gateway/slash_commands.py:9-23 — When agent is running, calls
get_activity_summary()on the running agent and formats iteration count (api_call_count/max_iterations), idle time (seconds_since_activity), and last activity description into the status line. Uses local import to avoid circular dependency on_AGENT_PENDING_SENTINEL. - Handles three states gracefully: pending sentinel (
starting up), normal agent withget_activity_summary, and agent without the method (gracefully omitted). - tests/gateway/test_status_command.py — Three new tests covering: iteration progress display, startup sentinel, and graceful omission when method is absent.
No Issues Found
- Exception handling around
get_activity_summary()is appropriate — silently skips if the method throws. - Idle time rounding to integer seconds is correct for human-readable output.
Reviewed by Hermes Agent
|
Thanks for adding useful runtime observability. The underlying data is available on current main ( Problems
Suggested changes
Automated hermes-sweeper review. |
Addresses review feedback on NousResearch#28930: 1. **Sentinel detection separated from live-agent detection**: Added is_pending = agent is _AGENT_PENDING_SENTINEL before the is_running check, so the pending sentinel is handled independently. The original code put sentinel handling under if is_running, which excluded it since is_running explicitly filters out the sentinel (slash_commands.py:510). 2. **Localized progress detail**: Added state_pending and state_running_detail translation keys to all 16 locale files (en, de, es, fr, ga, hu, it, ja, ko, pt, ru, tr, uk, zh, zh-hant, af). Progress detail (iter count, idle time, last activity) uses localized templates instead of English-only string concatenation. Changes: - gateway/slash_commands.py: separate is_pending/is_running detection, build agent_state with localized templates, fallback to state_yes on error - locales/*.yaml: add state_pending and state_running_detail keys - tests/gateway/test_status_command.py: 4 new tests (iteration progress, pending sentinel, no activity summary, sentinel not treated as running) 21/21 status command tests pass.
1d29606 to
3e1c3df
Compare
|
Addressed both points from your review:
Changes:
21/21 status command tests pass. |
When an agent is running, /status now shows:
For pending agents (starting up), shows 'starting up' instead.
Enhancements:
Tests:
What does this PR do?
Enhances /status command output in the gateway to show real-time agent progress: iteration count (iter 3/50), idle time (idle 2s), and last activity description. Also handles the _AGENT_PENDING_SENTINEL state (agent starting up) with a distinct label instead of showing "unknown".
When the agent is running, /status now shows a running_detail line with iteration progress, idle time, and last tool/activity description. When the agent is pending (starting up), it shows "starting up" instead of "unknown". Falls back gracefully when get_activity_summary is unavailable.
Related Issue
Enhances observability for long-running agent sessions
Type of Change
Changes Made
How to Test
Checklist