Skip to content

fix(gateway): make /status report live state and tokens#1476

Merged
teknium1 merged 1 commit into
mainfrom
fix/status-token-counts
Mar 16, 2026
Merged

fix(gateway): make /status report live state and tokens#1476
teknium1 merged 1 commit into
mainfrom
fix/status-token-counts

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

  • make /status bypass the running-agent interrupt path so it can report live state during an active run
  • persist actual per-run input/output token counts from the gateway agent result into the session store
  • add focused regression coverage for both live /status and token persistence

Root cause

  • /status was checked after the generic interrupt gate, so if an agent was running the command got queued like normal user text and never produced a live status response
  • session metadata updates only forwarded last_prompt_tokens, so input_tokens, output_tokens, and therefore total_tokens stayed at zero

Test plan

  • python -m py_compile gateway/run.py tests/gateway/test_status_command.py
  • python -m pytest tests/gateway/test_status_command.py tests/gateway/test_session.py tests/gateway/test_interrupt_key_match.py -n0 -q

Fixes #1465

@teknium1 teknium1 merged commit 7148534 into main Mar 16, 2026
1 check passed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
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.

/status always shows Tokens: 0 and Agent Running: No

1 participant