openclaw - 💡(How to fix) Fix [Bug]: Control UI inconsistently handles workspace-relative agent avatars even when /avatar/{agentId} resolves correctly [1 comments, 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#70700Fetched 2026-04-24 05:54:29
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×1subscribed ×1

Control UI / WebChat does not consistently handle workspace-relative identity.avatar values from IDENTITY.md.

A workspace-relative avatar such as:

- **Avatar:** avatars/懂王.jpg

is documented/schematically valid and is correctly resolved by the backend, but some Control UI rendering paths ignore it and fall back to the default avatar/logo instead of using the resolved /avatar/<agentId> route.

This looks like a frontend compatibility/regression issue in 2026.4.22 rather than a backend/avatar-serving failure.

Root Cause

That makes the current behavior especially confusing, because the configured value is valid and the backend honors it.

Fix Action

Fix / Workaround

is documented/schematically valid and is correctly resolved by the backend, but some Control UI rendering paths ignore it and fall back to the default avatar/logo instead of using the resolved /avatar/<agentId> route.

Code Example

- **Avatar:** avatars/懂王.jpg

---

- **Avatar:** avatars/test-avatar.jpg

---

- **Avatar:** avatars/懂王.jpg

---

{"avatarUrl":"/avatar/main"}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Control UI / WebChat does not consistently handle workspace-relative identity.avatar values from IDENTITY.md.

A workspace-relative avatar such as:

- **Avatar:** avatars/懂王.jpg

is documented/schematically valid and is correctly resolved by the backend, but some Control UI rendering paths ignore it and fall back to the default avatar/logo instead of using the resolved /avatar/<agentId> route.

This looks like a frontend compatibility/regression issue in 2026.4.22 rather than a backend/avatar-serving failure.

Steps to reproduce

  1. In the agent workspace IDENTITY.md, set a workspace-relative avatar path, for example:
    - **Avatar:** avatars/test-avatar.jpg
  2. Ensure the file exists in the workspace and is a valid image.
  3. Start/restart Gateway normally.
  4. Open Control UI / WebChat.
  5. Observe that some UI locations still show the default avatar/logo instead of the configured agent avatar.

Expected behavior

All Control UI / WebChat assistant-avatar surfaces should consistently display the configured agent avatar when identity.avatar is set to a valid workspace-relative path.

In particular, if the backend can already resolve the avatar through /avatar/<agentId>, frontend rendering should use that resolved route consistently instead of rejecting the original workspace-relative string.

Actual behavior

The backend resolves and serves the avatar correctly, but some frontend paths still render the default avatar/logo.

Observed facts from local verification on 2026.4.22:

  • IDENTITY.md contained:
    - **Avatar:** avatars/懂王.jpg
  • The image file existed and was valid.
  • GET /avatar/main?meta=1 returned:
    {"avatarUrl":"/avatar/main"}
  • GET /avatar/main returned 200 image/jpeg.
  • The bytes served by /avatar/main matched the configured workspace file exactly (SHA-256 matched).

So the failure is not:

  • a missing file
  • a bad workspace-relative path
  • a broken avatar endpoint
  • a failed upgrade

It appears to be a frontend rendering inconsistency.

Why this looks like a frontend bug

From inspection of the built Control UI bundle in 2026.4.22:

  • One code path correctly fetches /avatar/<agentId>?meta=1 and then /avatar/<agentId>.
  • But other code paths read identity.avatarUrl / identity.avatar directly and only accept values matching data:image/... or paths starting with /.
  • A workspace-relative value like avatars/懂王.jpg therefore gets rejected by those frontend branches, even though the backend supports it and exposes /avatar/main correctly.

In other words:

  • backend behavior: correct
  • documented config style: correct
  • frontend handling: inconsistent across UI branches

Docs / schema consistency note

This format appears intended/supported:

  • Docs template includes examples like workspace-relative avatar paths.
  • Runtime schema includes agents.list[].identity.avatar.

That makes the current behavior especially confusing, because the configured value is valid and the backend honors it.

OpenClaw version

2026.4.22

Operating system

macOS (arm64)

Install method

npm global

Model

Not model-related

Additional information

Related issues that may be adjacent but seem not identical:

  • #70166 — Control UI avatar broken after upgrade from v4.14 to v4.21
  • #53610 — Avatar endpoint /avatar/{agentId} returns 404
  • #17298 — Control UI should display configured agent avatars instead of default favicon

This report is narrower:

/avatar/main works correctly, but some Control UI rendering paths still ignore a valid workspace-relative identity.avatar and fall back to the default avatar.

Suggested fix direction

Control UI should normalize all assistant-avatar rendering to one consistent source of truth, preferably the resolved /avatar/<agentId> route (or an equivalent resolved URL), instead of directly validating raw identity.avatar strings in some branches and resolved avatar URLs in others.

extent analysis

TL;DR

The most likely fix is to update the Control UI frontend to consistently use the resolved /avatar/<agentId> route for rendering assistant avatars, instead of directly validating raw identity.avatar strings.

Guidance

  • Identify and update all frontend code paths that directly read and validate identity.avatar strings to instead use the resolved /avatar/<agentId> route.
  • Verify that the updated code correctly handles workspace-relative avatar paths and fetches the avatar image from the resolved URL.
  • Test the updated Control UI to ensure that all assistant-avatar surfaces consistently display the configured agent avatar.
  • Review related issues (#70166, #53610, #17298) to ensure that the fix does not introduce any regressions.

Example

No code snippet is provided as the issue does not include specific code that needs to be updated.

Notes

The fix direction suggested in the issue report is to normalize all assistant-avatar rendering to one consistent source of truth, which is the resolved /avatar/<agentId> route. This approach should ensure that the Control UI consistently displays the configured agent avatar.

Recommendation

Apply a workaround to update the Control UI frontend to consistently use the resolved /avatar/<agentId> route, as this is the most likely fix for the inconsistent avatar rendering issue. This approach ensures that the Control UI correctly handles workspace-relative avatar paths and displays the configured agent avatar.

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 Control UI / WebChat assistant-avatar surfaces should consistently display the configured agent avatar when identity.avatar is set to a valid workspace-relative path.

In particular, if the backend can already resolve the avatar through /avatar/<agentId>, frontend rendering should use that resolved route consistently instead of rejecting the original workspace-relative string.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING