Skip to content

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

@HenkDz

Description

@HenkDz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions