Skip to content

[Feature]: Control UI — auto-set document.title to current agent name for multi-agent workflows #80942

Description

@SymbolStar

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:

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 feat(gateway): add configurable Control UI title #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 feat(gateway): add configurable Control UI title #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

Suggested labels: area: ui, type: feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions