Skip to content

Dashboard agent dropdown shows session keys instead of agent names #22752

@CoderofTheWest

Description

@CoderofTheWest

Bug Description

The agent selection dropdown in the control dashboard displays mangled session keys like agent-main-main (agent:main:main) instead of the configured agent names (e.g., "Piper", "Clint").

Expected Behavior

When agents are configured with names in openclaw.json:

"agents": {
  "list": [
    { "id": "main", "name": "Piper" },
    { "id": "clint", "name": "Clint" }
  ]
}

The dropdown should show:

  • "Piper" for sessions belonging to agent main
  • "Clint" for sessions belonging to agent clint

Actual Behavior

The dropdown shows:

  • +1(PHONE NUMBER PLACE HOLDER) (agent:clint:main) — the phone number from webchat deliveryContext instead of the agent name
  • agent-main-main (agent:main:main) — mangled session key construction

Root Cause Analysis

Looking at the compiled dashboard JS (dist/control-ui/assets/index-Cvlv14C9.js), the Ns() function constructs dropdown labels:

function Ns(e,t){
  const n=t?.displayName?.trim()||"";
  const s=t?.label?.trim()||"";
  return n&&n!==e?`${n} (${e})`:s&&s!==e?`${s} (${e})`:e
}

This function:

  1. Takes the session key (e) and session object (t)
  2. Uses t.displayName (from deliveryContext, e.g., phone number) or t.label
  3. Never looks up the agent name from config

The wp() function builds dropdown options but also doesn't resolve agent names from the agents config.

Suggested Fix

The dashboard should:

  1. Parse the session key to extract agentId (format: agent:{agentId}:{sessionId})
  2. Look up the agent's name field from the loaded agents config
  3. Use that name as the displayName in the dropdown

Environment

  • OpenClaw version: 2026.2.14
  • Dashboard: dist/control-ui/assets/index-Cvlv14C9.js

Workaround

None known — this is a UI-side bug requiring code changes.


Related to session display logic in the control UI. The fix should be straightforward: add an agent name lookup step when constructing dropdown labels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions