Bug
Running always reports and , even mid-session after many exchanges.
Root Cause
Tokens: 0 — In gateway/run.py:1823, update_session() only passes last_prompt_tokens (the prompt size estimate). The actual input_tokens and output_tokens from the LLM API response are never forwarded. In session.py:616, total_tokens is calculated as input_tokens + output_tokens, which stays 0.
Agent Running: No — _running_agents is checked at run.py:1890, but the agent is removed in the finally block (run.py:3132) after each response completes. Since /status is a sync command, it can only be checked between responses — so it always shows No.
Environment
- Hermes Agent v0.2.0 (2026.3.12)
- Python 3.11.14
- Telegram platform
Bug
Running always reports and , even mid-session after many exchanges.
Root Cause
Tokens: 0 — In
gateway/run.py:1823,update_session()only passeslast_prompt_tokens(the prompt size estimate). The actualinput_tokensandoutput_tokensfrom the LLM API response are never forwarded. Insession.py:616,total_tokensis calculated asinput_tokens + output_tokens, which stays 0.Agent Running: No —
_running_agentsis checked atrun.py:1890, but the agent is removed in thefinallyblock (run.py:3132) after each response completes. Since/statusis a sync command, it can only be checked between responses — so it always shows No.Environment