Skip to main content

Module rename

Module rename 

Source
Expand description

Renaming an agent’s displayed name: the one path the window’s renameagentdefinitiontitle and an agent’s Agents rename both take, so every place that shows or addresses the agent follows.

Deliberately separate from updateagent, which preserves branch_label unconditionally (core.rs: “parent_id + branch_label describe provenance and are immutable post-insert”). That stays true for every other caller of updateagent; this is the one narrow, explicit path that may change it, and only the field the tab strip’s titleOf() displays: branch_label when the row already has one (a fork), else name (a lineage root). See SPEC_PANE_TAB_STRIP_COMPACT_SIZING_AND_RENAME_2026_07_22.md §4.

Enums§

RenameError 🔒
Why a rename did not happen.

Functions§

kept_for_it_alone 🔒
Whether id is the only agent name is kept for, so it may take the name back.
refuse_if_taken 🔒
Refuse title when another agent answers to it, as typed or as a message addressed to it is routed (Zed Bot and Zed-Bot are one route), or when it is a name another agent was renamed from.
rename_title 🔒
Give agent id the displayed name title. Its slug, id, signing keys and workspace folder stay as they are; the old name still reaches it as a former name (display_rename), and no other agent may take a name it still answers to. refuse_taken also refuses a name another agent answers to now (its name, slug or display name, or a slug it was renamed from): an agent renaming an agent must not make two agents answer to one name. Returns the renamed definition and the displayed name it replaced.
show_new_name 🔒
Set the pane’s agentName to title and clear an earlier frame:title.
shown_name 🔒
What the tab strip shows for the agent: its fork label, else its name.