openclaw - 💡(How to fix) Fix Control UI shows wrong agent identity name for non-main agent sessions [1 comments, 2 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#72776Fetched 2026-04-28 06:32:18
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Timeline (top)
closed ×1commented ×1

Fix Action

Fix / Workaround

  1. Session routing is correct — messages dispatch to agent:fs-daying properly.

Code Example

{
  "agents": {
    "list": [
      {
        "id": "main",
        "name": "0.AI大管家(主)",
        "identity": { "name": "AI大管家", "emoji": "🤵" }
      },
      {
        "id": "fs-daying",
        "name": "1.大颖(主)",
        "identity": { "name": "大颖", "emoji": "💻" },
        "workspace": "/Users/rocky/.openclaw/workspace-fs-daying"
      }
    ]
  }
}
RAW_BUFFERClick to expand / collapse

Bug Description

When viewing a non-main agent session in the Control UI, the header displays the main agent's identity name instead of the correct agent name for that session.

Environment

  • OpenClaw: 2026.4.24 (cbcfdf6)
  • OS: macOS 26.4.1 (arm64)
  • Node: v25.9.0

Setup

Multiple agents configured in openclaw.json:

{
  "agents": {
    "list": [
      {
        "id": "main",
        "name": "0.AI大管家(主)",
        "identity": { "name": "AI大管家", "emoji": "🤵" }
      },
      {
        "id": "fs-daying",
        "name": "1.大颖(主)",
        "identity": { "name": "大颖", "emoji": "💻" },
        "workspace": "/Users/rocky/.openclaw/workspace-fs-daying"
      }
    ]
  }
}

The fs-daying workspace also has an IDENTITY.md with Name: 大颖.

Expected Behavior

When viewing the agent:fs-daying:feishu:direct:* session in Control UI, the header should display "大颖".

Actual Behavior

Control UI header displays "AI大管家" (the main agent's name) regardless of which agent session is being viewed.

Investigation

  1. resolveAssistantIdentity() in assistant-identity-B3FaldPp.js correctly resolves the name priority:

    • cfg.ui.assistant.name → not set
    • resolveAgentIdentity(cfg, agentId).name"大颖"
    • loadAgentIdentity(workspaceDir).name"大颖"
    • Default: "Assistant"
  2. The agent.identity.get RPC handler calls resolveAssistantIdentity() with the correct agentId resolved from session key.

  3. Session routing is correct — messages dispatch to agent:fs-daying properly.

  4. Hard refresh (Cmd+Shift+R) does not fix the issue.

Hypothesis

Control UI may cache the main agent's identity on initial load and not re-fetch agent.identity.get when switching to a different agent's session. Or the call is not passing the correct sessionKey/agentId parameter.

Steps to Reproduce

  1. Configure two agents with different identity.name values
  2. Have a session for the non-main agent (e.g., via feishu channel)
  3. Open Control UI
  4. Switch to the non-main agent's session
  5. Header shows main agent's name instead

Notes

  • Config is verified correct — the gateway resolves the right identity
  • Only the Control UI display is affected
  • Actual agent behavior and routing work correctly

extent analysis

TL;DR

The issue can likely be fixed by ensuring the agent.identity.get RPC handler is called with the correct sessionKey/agentId parameter when switching to a different agent's session.

Guidance

  • Verify that the resolveAssistantIdentity() function is being called with the correct agentId when switching sessions.
  • Check the agent.identity.get RPC handler to ensure it is passing the correct sessionKey/agentId parameter.
  • Investigate if there is any caching mechanism in the Control UI that may be causing the main agent's identity to be displayed instead of the correct agent's identity.
  • Test if updating the openclaw.json configuration or the IDENTITY.md file affects the issue.

Example

No code snippet is provided as the issue seems to be related to the logic of the resolveAssistantIdentity() function and the agent.identity.get RPC handler, which are not fully shown in the issue body.

Notes

The issue seems to be specific to the Control UI display and does not affect the actual agent behavior and routing. The configuration is verified to be correct, and the gateway resolves the right identity.

Recommendation

Apply workaround: Modify the agent.identity.get RPC handler to ensure it is passing the correct sessionKey/agentId parameter when switching to a different agent's session, or investigate and disable any caching mechanism that may be causing the issue. This is recommended as the issue seems to be related to the logic of the resolveAssistantIdentity() function and the agent.identity.get RPC handler, and modifying these may fix the 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…

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 - 💡(How to fix) Fix Control UI shows wrong agent identity name for non-main agent sessions [1 comments, 2 participants]