openclaw - ✅(Solved) Fix [Bug]: Agent avatar not refreshing correctly when switching between agents in same browser session [1 pull requests, 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#59438Fetched 2026-04-08 02:25:09
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×2cross-referenced ×1

When using the OpenClaw Web UI (webchat), agent avatars do not refresh correctly when switching between different agents within the same browser session.

Root Cause

When using the OpenClaw Web UI (webchat), agent avatars do not refresh correctly when switching between different agents within the same browser session.

Fix Action

Fixed

PR fix notes

PR #59463: fix(ui): refresh chat avatar when switching agents

Description (problem / solution / changelog)

Summary

  • refresh the chat avatar whenever the active chat session changes
  • route agent picker changes through the shared session switch helper so avatar refresh stays consistent
  • add node coverage for the shared session-switch path and include those helper tests in Vitest

Closes #59438

Changed files

  • ui/src/ui/app-render.helpers.switch.node.test.ts (added, +90/-0)
  • ui/src/ui/app-render.helpers.ts (modified, +4/-1)
  • ui/src/ui/app-render.ts (modified, +1/-11)
  • vitest.config.ts (modified, +1/-0)
  • vitest.unit-paths.mjs (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When using the OpenClaw Web UI (webchat), agent avatars do not refresh correctly when switching between different agents within the same browser session.

Steps to reproduce

  1. Open the Web UI and log into a session with Agent A
  2. Verify that Agent A's avatar is displayed correctly
  3. Click the agent selector in the top-left corner to switch to Agent B
  4. Observe: Agent B's chat window still shows Agent A's avatar (❌ incorrect)
  5. Refresh the page while on Agent B's chat
  6. Observe: Agent B now shows the correct avatar (✅), BUT if you switch back to Agent A's chat, Agent A now shows Agent B's avatar (❌)
  7. The avatars are now "swapped" and the pattern repeats

Expected behavior

  • Each agent should display their own avatar at all times
  • Switching between agents should immediately show the correct avatar for each agent

Actual behavior

  1. When chatting with Agent A, the correct avatar for Agent A is displayed
  2. When switching to Agent B (via the agent selector in the top-left corner) without refreshing the page, Agent B still shows Agent A's avatar
  3. If the user refreshes the page while on Agent B's chat, Agent B's correct avatar appears, BUT now Agent A's chat (in the other tab/window) will incorrectly show Agent B's avatar
  4. The avatars appear to be "cross-contaminated" between sessions — essentially the last-loaded avatar gets cached globally and shared across all agent sessions until a page refresh forces a re-render

OpenClaw version

2026.4.1

Operating system

Docker

Install method

No response

Model

minimax

Provider / routing chain

minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

  • Both agents have valid avatars configured in their respective IDENTITY.md files
  • Avatar paths are workspace-relative
  • The issue seems to be that the avatar is cached globally per browser tab rather than per agent session
  • This suggests the frontend is not correctly invalidating/refresh the avatar state when the active agent changes

extent analysis

TL;DR

  • The most likely fix involves updating the frontend code to invalidate and refresh the avatar state when the active agent changes.

Guidance

  • Investigate the avatar caching mechanism in the frontend code to ensure it is scoped to the agent session rather than the browser tab.
  • Verify that the IDENTITY.md files for both agents have correct and unique avatar configurations.
  • Check the code responsible for handling agent switching in the top-left corner to ensure it triggers a refresh of the avatar state.
  • Consider adding a unique identifier or token to the avatar URL to prevent caching across agent sessions.

Example

  • No specific code example can be provided without more information about the frontend codebase, but the fix might involve updating a function like updateAgentAvatar() to include a cache-busting parameter.

Notes

  • The issue seems to be related to the frontend code and caching mechanism, but without access to the codebase, it's difficult to provide a more specific solution.
  • The use of workspace-relative avatar paths may also be a factor, but it's unclear without more information about the project structure.

Recommendation

  • Apply a workaround by adding a cache-busting parameter to the avatar URL or by implementing a more robust caching mechanism that scopes to the agent session.
  • This approach is recommended because it directly addresses the caching issue and can be implemented without requiring a full understanding of the underlying codebase.

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

  • Each agent should display their own avatar at all times
  • Switching between agents should immediately show the correct avatar for each agent

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Agent avatar not refreshing correctly when switching between agents in same browser session [1 pull requests, 1 participants]