openclaw - 💡(How to fix) Fix [Feature]: Control UI — auto-set document.title to current agent name for multi-agent workflows [2 pull requests]

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…

Fix Action

Fixed

Code Example

document.title = `${gatewayConfigTitle || assistantName || agentId || "Control"} · OpenClaw`;
RAW_BUFFERClick to expand / collapse

Problem / scenario

When running a multi-agent setup (e.g. main, milly, sherry, judy) it's now routine to have multiple Control UI browser tabs open simultaneously, one per agent. Today every tab shows the same static OpenClaw Control in document.title, so:

  • The browser tab strip is a wall of identical favicons + identical titles.
  • Cmd-` / Cmd-number tab switching becomes guesswork.
  • Pinned tabs and history entries collapse into one indistinguishable blob.
  • When one agent is mid-stream, there's no visual hint which tab is producing output.

The static title is actively painful as soon as you have >1 agent.

Why this is different from #27027

#27027 ("set document.title to agent name for multi-agent setups") was closed as not planned on 2026-04-10 by the stale bot. The original ask was thin on use case and got no maintainer engagement before it aged out.

Since then, multi-agent simultaneous workflows (one Control UI tab per agent, several open at once, often pinned) have become a routine pattern rather than an edge case. Re-opening the request with:

  • a concrete user-visible failure mode (tab strip / Cmd-` ambiguity),
  • a dynamic per-tab design (not just a one-shot label), and
  • a clean fallback chain that composes with the in-flight #51067 work

should make the trade-off easier to evaluate this time around.

Why this is different from #51052 / PR #51067

PR #51067 introduces gateway.controlUi.title — a static, instance-wide title for cross-instance disambiguation (e.g. "prod gateway" vs "laptop gateway"). That is orthogonal to this proposal.

This proposal is dynamic, intra-instance, per-agent:

  • A single gateway hosting several agents would still benefit from per-tab titles even if gateway.controlUi.title is unset.
  • When gateway.controlUi.title is set, it should win — operators who configured a static title clearly want that string everywhere.
  • When it's unset, fall back to the active agent's name.

The two features compose cleanly; this is not a duplicate.

Proposed implementation sketch

In ui/src/ui/app-lifecycle.ts handleUpdated(), observe assistantName / assistantAgentId / sessionKey changes from host state and update document.title:

document.title = `${gatewayConfigTitle || assistantName || agentId || "Control"} · OpenClaw`;
  • If PR #51067 lands first, gatewayConfigTitle (gateway.controlUi.title) takes precedence.
  • Otherwise, use the active agent's display name; fall back to agent id; fall back to Control.
  • Optional polish:
    • Identity already exposes an emoji (see IDENTITY.md), so render as e.g. 🛠️ Milly · OpenClaw.
    • Prefix while a chat stream is in progress, so users can see at-a-glance which tab is currently generating.

Estimated change: ~20 LoC plus a small effect/subscription wiring.

Why now / impact

  • Improves multi-agent UX significantly for what is now a common workflow.
  • Zero behavior change for single-agent users (title resolves to today's value via the fallback chain).
  • Cheap to implement and trivially revertable.

Acceptance criteria

  • Switching the active agent in a Control UI tab updates document.title within one frame.
  • When PR #51067's gateway.controlUi.title is set, it wins over the agent name.
  • With no agent loaded yet, the title remains a graceful OpenClaw (no flicker, no undefined).

Cross-refs

  • #27027 (closed not planned, predecessor)
  • #51052 + PR #51067 (orthogonal: static instance-wide title — should compose, not collide)

Suggested labels: area: ui, type: feature.

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