-
-
Notifications
You must be signed in to change notification settings - Fork 69.3k
Dashboard agent dropdown shows session keys instead of agent names #22752
Description
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 nameagent-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:
- Takes the session key (
e) and session object (t) - Uses
t.displayName(from deliveryContext, e.g., phone number) ort.label - 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:
- Parse the session key to extract
agentId(format:agent:{agentId}:{sessionId}) - Look up the agent's
namefield from the loaded agents config - 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.