Skip to content

session_status with current sessionKey resolves to wrong session in webchat #89773

Description

@killo3967

Describe the bug

session_status(sessionKey: "current") returns data from a different/fake session instead of the active webchat session.

Steps to reproduce

  1. Start a webchat conversation with an agent
  2. Accumulate tokens and change reasoning level (e.g. /reasoning low)
  3. From a tool call, invoke session_status(sessionKey: "current")
  4. Compare with user-facing /status and sessions_list output

Expected behavior

Same data as /status: correct token count, thinking level, session key.

Actual behavior

session_status("current") returns:

  • Think: high instead of Think: low
  • Context: 0/1.0m instead of 97k/1.0m
  • Session: main instead of agent:admin:main
  • No cost estimate shown

Workaround

Using the explicit session key works: sessionStatus(sessionKey: "agent:admin:main")

Environment

  • OpenClaw version: 2026.5.27 (27ae826)
  • OS: Windows 10.0.26100 (x64)
  • Channel: webchat (direct)
  • Mode: local

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions