feat(gateway): show live agent activity in /status (current tool, iteration, idle) - #83167
feat(gateway): show live agent activity in /status (current tool, iteration, idle)#83167Visol-456 wants to merge 2 commits into
Conversation
Duplicate of #43993: both add the shared running-agent activity summary (iteration, activity/tool, idle time) to /status. |
5510b8c to
f461ac3
Compare
|
Thanks for the triage. I understand the overlap with #43993 (LifeJiggy) — both PRs surface the running-agent activity |
PR Description — feat/status-live-activity
What does this PR do?
/status is the manual, on-demand view of a running agent, but while the agent is busy it reports only a bare boolean ("Agent running: yes/no") plus session metadata, model and token counts. When a turn drags on (e.g. a provider stalls on the SSE connection for minutes, then a slow auxiliary call like vision_analyze adds more wait), the user cannot tell whether the agent is waiting on the API, executing a tool, compressing context, or stalled — there is no basis to decide between waiting, interrupting, or investigating. The automatic "still working" heartbeat (agent.gateway_notify_interval, default 180s) already surfaces this live activity, but a manual /status query returns none of it.
This PR appends a live activity block to /status when the session's agent is running, built from the existing shared activity observation contract AIAgent.get_activity_summary() (run_agent.py, #72016/#72039) — the same single source the heartbeat and busy-ack already use. No new data collection, no core agent changes: the pushed view and the pulled view now show the same information.
Related Issue
Fixes #83077
Type of Change
Changes Made
How to Test
Checklist
Code
Documentation & Housekeeping
Screenshots / Logs
tests/agent/test_i18n.py + tests/gateway/test_status_command.py: 47 passed, 1 failed
(1 failure = pre-existing Windows-only /profile home-path abbreviation test, untouched by this PR)