Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
The Control UI chat pane seeds its inline rename input with the rendered session title, so a partially edited submit persists presentation as a stored user label; with account-qualified sessions this stores the account discriminator into the label and renders a doubled account suffix.
Steps to reproduce
Requires a channel with more than one account configured, so sessions carry a non-default accountId (for example a cards Telegram account alongside the default).
- Open a Control UI chat pane on a session with a non-default account and no stored label — for example
agent:main:telegram:cards:direct:42with a GatewaydisplayNameofAlice. The pane title readsAlice · cards. - Click the pane title to start the inline rename. The input is pre-filled with
Alice · cards. - Edit only the leading part and submit — for example type
VIPin front, leaving the tail intact, so the value isVIP Alice · cards. - Observe the stored label is now
VIP Alice · cards. - Repeat step 2-3 but edit the tail instead, for example to
Alice · cards2, and submit.
Expected behavior
An editable field should be seeded with data the user owns — the stored label, or at most the undecorated name — so a rendered discriminator can never become persisted data. The Sessions page and the sidebar rename dialog already behave this way: both seed from the stored label (ui/src/pages/sessions/sessions-page.ts uses normalizeOptionalString(row.label) ?? "", and ui/src/components/session-organizer-controller.ts uses normalizeOptionalString(session.userLabel) ?? ""), so neither can persist a derived string. The chat pane is the remaining surface that does not.
Actual behavior
The chat pane seeds the rename input with the resolved display name, and a partial edit persists it verbatim:
ui/src/pages/chat/chat-page-pane-render.ts:76sets the pane title fromresolveSessionDisplayName(resolvedKey, row), which appends" · <accountId>"for a non-default account.ui/src/pages/chat/chat-pane-session-menu.ts:256seeds the input withthis.headerRenameInitialValue = customLabel ?? this.paneTitle, so an unlabeled row pre-fills with the rendered title.commitHeaderRenameguards only the completely untouched case:unchangedDerivedTitle = this.headerRenameInitialLabel === null && trimmed === this.headerRenameInitialValue.trim(). Any partial edit falls through to an ordinary label write and is persisted verbatim viapatchChatSessionLabel→sessions.patch({ label })(ui/src/pages/chat/chat-state-route.ts:81).
Step 3 above therefore stores VIP Alice · cards as a real user label — presentation captured as user data, which then outranks every later derivation.
Step 5 shows the residual rendering defect. #124228 added an idempotence check in withAccountDisambiguator (ui/src/lib/session-display.ts) that leaves a name alone when it already ends in the exact suffix, so VIP Alice · cards renders correctly. That check only matches the exact tail: a label edited to Alice · cards2 still renders Alice · cards2 · cards.
The check is a deliberate guard against this producer, not a fix for it — the account is still frozen into user state, and the guard sits at the display end rather than at the surface that writes the data.
OpenClaw version
main at bf4ec4b (unreleased; the account suffix ships in #124228)
Operating system
macOS 15 (Darwin 25.3.0). The path is Control UI browser code and is not platform-specific.
Install method
pnpm dev / source checkout
Model
Not applicable — Control UI display and session-label persistence path; no model is involved.
Provider / routing chain
Not applicable — no provider request is involved. The account identity comes from the Gateway's route projection onto the session row (src/gateway/session-classification.ts).
Additional provider/model setup details
Not applicable.
Logs
Not applicable - no error is logged. The write succeeds; the defect is that the
persisted value is a rendered string rather than user-authored data.Screenshots, recordings, and evidence
Traced in source as cited above and confirmed against bf4ec4b58af by driving the pane methods directly: beginHeaderRename on a cards row with displayName: Alice and no label pre-fills Alice · cards, and committing VIP Alice · cards calls sessions.patch with exactly { label: "VIP Alice · cards" }.
Impact and severity
- Affected: Control UI users with more than one account configured on a channel, using the chat pane inline rename. The seeding problem itself affects any session whose title is derived rather than stored; the account suffix is what makes it visible.
- Severity: Low-to-moderate. No data loss and no crash. A derived string becomes user state, and one edit shape renders a visibly wrong title.
- Frequency: Deterministic for the described edit shapes; only reachable through the chat pane rename, since the sidebar and Sessions page already seed from the stored label.
- Consequence: Session labels silently capture presentation. Once stored, the label outranks later derivation, so a session keeps a stale account discriminator even if its account changes, and tail edits render a doubled suffix.
Additional information
Context and constraint for whoever picks this up:
- fix(ui): disambiguate multi-account session labels #124228 introduced the account suffix and moved the sidebar rename onto the stored label. It deliberately did not change the chat pane, and recorded this as a follow-up in its description.
- The chat pane's seed-from-rendered-title behavior is intentional: it arrived with the header session menu in feat(ui): move chat view toggles into a header session menu #121452, and the
unchangedDerivedTitleguard exists precisely so an untouched derived title is not persisted. It is pinned byui/src/pages/chat/chat-pane.test.ts("cancels and skips unchanged labels", which setspaneTitle = "Derived title"). So this is not a matter of deleting the pre-fill — an inline title edit conventionally starts from the displayed text, and simply seeding empty would change that affordance for every session, not only account-qualified ones. - The likely shape is to expose the undecorated resolved name from
ui/src/lib/session-display.tsand seed the editable field from that, keeping the account suffix as display-only decoration. That would remove the only known producer of suffixed stored labels, at which point theendsWithidempotence check inwithAccountDisambiguatorcan be deleted and its comment retired. - Related but separate:
src/gateway/server-methods/agent-session-patch.tsre-persists the existing label on each turn without routing throughparseSessionLabel, which entrenches a once-stored bad label. Worth checking while in this area.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Aug 15, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 15, 2026, 7:47 PM ET / 23:47 UTC.
Summary
Keep open: current main still lets a partial chat-pane rename persist a rendered account suffix. This member-owned, maintainer-labelled issue needs a small UI-direction decision before repair.
Reproducibility: yes. —current source provides a high-confidence path: an unlabeled non-default-account row supplies a suffixed pane title, and a partial edit is passed to sessions.patch. It was not executed locally because this review is read-only.
Root-cause cluster
Relationship:
canonicalCanonical: #124307
Summary: This issue is the canonical remaining producer-side follow-up; the merged display-disambiguation PR made the behavior visible but explicitly left this path unresolved.
Members:
partial_overlap: fix(ui): disambiguate multi-account session labels #124228 - It added account-title disambiguation and an idempotence guard, while its discussion explicitly left the chat-pane rename producer as follow-up work.adjacent_distinct: feat(ui): move chat view toggles into a header session menu #121452 - It introduced the header session-menu rename surface but addressed a broader chat-header interaction change.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Maintainer decision needed
Why: Both choices prevent future persistence of presentation data, but they intentionally differ in the established inline-rename experience and should not be selected by automation.
Next step
A focused repair is feasible, but a maintainer must first choose whether unlabeled inline renames preserve a base-name prefill or begin blank.
Review details
Best possible solution:
Carry an undecorated editable session name separately from the rendered account discriminator into the chat pane, and retain the display idempotence guard for labels already stored.
Do we have a high-confidence way to reproduce the issue?
Yes—current source provides a high-confidence path: an unlabeled non-default-account row supplies a suffixed pane title, and a partial edit is passed to sessions.patch. It was not executed locally because this review is read-only.
Is this the best way to solve the issue?
No for removing the idempotence guard: prevention at the chat-pane producer is the right layer, but the guard must continue protecting labels already captured by current main.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against bf4ec4b58af0.
Label changes
Label changes:
P2: This is a deterministic, limited-surface persistence and title-rendering defect without data loss, security impact, or a blocked setup path.impact:session-state: A display-only account discriminator can become a durable session label and later outlive the derivation it came from.impact:ux-friction: Affected users can see a doubled or stale account suffix after an ordinary inline rename.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.clawsweeper:needs-product-decision: Current issue advisory state selects this label.Label justifications:
P2: This is a deterministic, limited-surface persistence and title-rendering defect without data loss, security impact, or a blocked setup path.impact:session-state: A display-only account discriminator can become a durable session label and later outlive the derivation it came from.impact:ux-friction: Affected users can see a doubled or stale account suffix after an ordinary inline rename.Evidence reviewed
What I checked:
ui/src/pages/chat/chat-pane-session-menu.ts:257, bf4ec4b58af0)ui/src/pages/chat/chat-page-pane-render.ts:76, bf4ec4b58af0)ui/src/lib/session-display.ts:110, bf4ec4b58af0)ui/src/components/session-organizer-controller.ts:423, bf4ec4b58af0)ui/src/pages/chat/chat-pane.test.ts:220, bf4ec4b58af0)src/gateway/server-methods/agent-session-patch.ts:138, bf4ec4b58af0)Likely related people:
ui/src/lib/session-display.ts)ui/src/pages/chat/chat-pane-session-menu.ts,ui/src/pages/chat/chat-pane.test.ts)ui/src/components/session-organizer-controller.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.