openclaw - 💡(How to fix) Fix [Bug]: Bug: Footer metrics (context/model/cache) not displaying for non-main agent IDs [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60024Fetched 2026-04-08 02:37:18
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

Problem Description When using a custom agent ID (e.g., "oshin" instead of "main"), the footer metrics that require reading from session store fail to display. Only real-time metrics like tokens and elapsed work correctly.

Root Cause

Problem Description When using a custom agent ID (e.g., "oshin" instead of "main"), the footer metrics that require reading from session store fail to display. Only real-time metrics like tokens and elapsed work correctly.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Problem Description When using a custom agent ID (e.g., "oshin" instead of "main"), the footer metrics that require reading from session store fail to display. Only real-time metrics like tokens and elapsed work correctly.

Steps to reproduce

Steps to Reproduce Set up OpenClaw with a custom agent ID (e.g., oshin) Configure channels.feishu.footer with all options enabled: { "status": true, "elapsed": true, "tokens": true, "cache": true, "context": true, "model": true }

Send a message via Feishu Observe the footer - only "Usage: X in / Y out" and "已完成 · 耗时 Xs" display Check logs: footer metrics lookup: session entry missing (storePath=/home/.openclaw/agents/main/sessions/)

Expected behavior

All footer metrics should display correctly regardless of agent ID. Actual Behavior ✅ tokens - displays correctly (real-time, no session store needed) ✅ status - displays correctly (local state) ✅ elapsed - displays correctly (local timer) ❌ context - not displayed (requires session store lookup) ❌ model - not displayed (requires session store lookup) ❌ cache - not displayed (requires session store lookup)

Actual behavior

In streaming-card-controller.js, the footer metrics lookup uses a hardcoded path that points to agents/main/sessions/ instead of agents/{agentId}/sessions/. The sessionKey correctly contains the agent ID (e.g., agent:oshin:main), but the storePath resolves to agents/main/sessions/ instead of agents/oshin/sessions/.

From logs:

footer metrics lookup: session entry missing sessionKey=agent:oshin:main storePath=/home/.openclaw/agents/main/sessions/sessions.json source=runtime.agent.session

Suggested Fix Update the session store path resolution in streaming-card-controller.js to use the actual agent ID from the sessionKey, rather than defaulting to main.

OpenClaw version

4.2

Operating system

ubuntu2404

Install method

No response

Model

all

Provider / routing chain

all

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

Update the session store path resolution in streaming-card-controller.js to use the actual agent ID from the sessionKey.

Guidance

  • Verify the sessionKey contains the correct agent ID (e.g., agent:oshin:main) to ensure the issue is with the storePath resolution.
  • Check the streaming-card-controller.js file to confirm the hardcoded path agents/main/sessions/ is being used instead of agents/{agentId}/sessions/.
  • Update the storePath resolution to use the actual agent ID from the sessionKey, replacing main with the dynamic agent ID.
  • Test the updated code with a custom agent ID to ensure all footer metrics display correctly.

Example

// Example update in streaming-card-controller.js
const agentId = sessionKey.split(':')[1]; // Extract agent ID from sessionKey
const storePath = `/home/.openclaw/agents/${agentId}/sessions/sessions.json`;

Notes

This fix assumes the sessionKey format is consistent and the agent ID can be extracted reliably. Additional testing may be necessary to ensure the updated code works with different agent IDs and scenarios.

Recommendation

Apply the workaround by updating the storePath resolution in streaming-card-controller.js to use the actual agent ID from the sessionKey, as this directly addresses the identified issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

All footer metrics should display correctly regardless of agent ID. Actual Behavior ✅ tokens - displays correctly (real-time, no session store needed) ✅ status - displays correctly (local state) ✅ elapsed - displays correctly (local timer) ❌ context - not displayed (requires session store lookup) ❌ model - not displayed (requires session store lookup) ❌ cache - not displayed (requires session store lookup)

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING