fix(cmux-next): persist first agent chat titles by default

Merged
TE
13d ago
+56-9

What changed

The existing guarded workspace auto-namer now defaults to the persisted variant. When a default-named workspace receives its first real agent chat title, the workspace adopts that title through the existing workspace_rename source/revision path. Manual names and explicit agent renames remain authoritative, and later chats do not replace the first name.

Leo’s request: “if you're just starting a single agent chat ... if it was still the default template, then just rename it.”

Testing

  • Red-before fleet step a2ede8b71f2b766a3260a959 at 31002abbef6d0e62c6e58f3d13650ea732490a6c: WorkspaceAutoNameTests failed the new default-variant assertion.
  • The xhigh review found that acpmux’s prompt fallback was being exposed as generatedTitle; this head carries the titleSource protocol field and excludes prompt/manual/unknown sources.
  • Green-after fleet step b62f7973c9550bb862915c17 at 6bb92f7517a486392b599f4a056ab362baeb3337: AgentTabNamingTests passed on Xcode 26.6. The protocol freshness and generated-type checks also pass in PR CI.
  • cargo fmt --all -- --check, bun scripts/acpmux-protocol-codegen.ts --check, and git diff --check pass.

Observed / Not run

No local native build or Swift test was run; macOS validation used the fleet. The focused fleet suite passes; unrelated base-red checks remain advisory.

Changelog

Changed: default workspaces persist their first generated agent chat title.

Proof

The gallery visual-evidence run for this exact head passed (40141162901). The before/after fleet recording for this exact auto-name behavior is retained in PR #20397:

before after

The direct current-head capture was privacy-refused because the capture mini hostname appeared in the frame; it was not uploaded.

Agent-Session: big-red