Bug Report
Summary
In multi-agent OpenClaw deployments, the streaming card footer fails to display session metrics (token counts, model info, etc.) for all agents except the default (main). The footer renders as empty/blank for non-default agents.
Root Cause
In src/card/streaming-card-controller.ts, getFooterSessionMetrics() calls resolveStorePath() without passing an agentId parameter. The OpenClaw runtime's resolveStorePath defaults to "main" when no agentId is provided, so all agents resolve to main's sessions.json. Non-default agents (e.g. cook, margaret) find no matching entries there, resulting in blank footers.
The bug exists in both code paths:
sessionApi.resolveStorePath(sessionStorePath) — runtime in-memory store
channelSession.resolveStorePath(sessionStorePath) — filesystem fallback store
Reproduction
- Deploy OpenClaw with ≥2 agents (e.g.
main + cook)
- Enable footer metrics in config:
channels.feishu.footer.tokens: true (or context, model, etc.)
- Send a message through a non-default agent (e.g.
cook)
- Observe: the completed card footer shows no metrics for the non-default agent
- Send a message through
main → footer displays correctly
Impact
- Only affects multi-agent deployments
- Single-agent setups work fine (the default
"main" matches the only agent)
- Non-critical: footer metrics are informational, no functional breakage
Fix
The same resolveStorePath call in src/card/tool-use-config.ts already passes { agentId } (line 35):
const storePath = resolveStorePath(sessionStorePath, { agentId });
The fix aligns streaming-card-controller.ts with this existing pattern:
- Extract
agentId from the session key (agent:<id>:… format)
- Pass
{ agentId: storeAgentId } to both resolveStorePath() calls
- Update inline type declarations to include the
opts parameter
PR
Fix available in #490
Environment
- openclaw-lark version: 2026.5.7
- OpenClaw version: 2026.5.x
- Agents: 10 (main, cook, margaret, zhangxiaolong, jobs, jonathan, wangyangming, jiamu, buffett, turing)
Bug Report
Summary
In multi-agent OpenClaw deployments, the streaming card footer fails to display session metrics (token counts, model info, etc.) for all agents except the default (
main). The footer renders as empty/blank for non-default agents.Root Cause
In
src/card/streaming-card-controller.ts,getFooterSessionMetrics()callsresolveStorePath()without passing anagentIdparameter. The OpenClaw runtime'sresolveStorePathdefaults to"main"when noagentIdis provided, so all agents resolve tomain'ssessions.json. Non-default agents (e.g.cook,margaret) find no matching entries there, resulting in blank footers.The bug exists in both code paths:
sessionApi.resolveStorePath(sessionStorePath)— runtime in-memory storechannelSession.resolveStorePath(sessionStorePath)— filesystem fallback storeReproduction
main+cook)channels.feishu.footer.tokens: true(orcontext,model, etc.)cook)main→ footer displays correctlyImpact
"main"matches the only agent)Fix
The same
resolveStorePathcall insrc/card/tool-use-config.tsalready passes{ agentId }(line 35):The fix aligns
streaming-card-controller.tswith this existing pattern:agentIdfrom the session key (agent:<id>:…format){ agentId: storeAgentId }to bothresolveStorePath()callsoptsparameterPR
Fix available in #490
Environment