Summary
The interactive TUI has no /rename command. Renaming the current session today requires knowing the /name <name> command; there is no argument-less form that lets you edit the existing name, and no main-editor keybinding action for it. OpenCode ships /rename (a prefilled rename prompt, plus a session_rename keybind) and users coming from it expect the same verb. This issue tracks giving the TUI a first-class /rename for the current session, keeping /name as an alias.
Reproduction
senpi (or omo) in any project, send one prompt so a session exists.
- Type
/rename — autocomplete offers nothing; submitting it reports an unknown command and the text is sent nowhere useful.
- Type
/name with no argument — it only prints the current name or Usage: /name <name>; there is no way to edit the existing name in place.
/hotkeys lists no action for renaming the current session from the main editor (app.session.rename only works inside the /resume picker).
Expected (ideal state / acceptance criteria)
/rename [name] is a builtin slash command: listed in BUILTIN_SLASH_COMMANDS with an argument hint, offered by autocomplete, shown by /hotkeys and help.
/rename <name> sets the session display name with the same normalization /name applies today (newlines collapsed, trimmed), prints Session name set: <name> in the chat, and the footer shows the new name immediately.
/rename with no argument opens an inline rename editor prefilled with the current session name (OpenCode DialogSessionRename parity): Enter commits, Escape cancels, a whitespace-only submit warns Session name cannot be empty and appends no session_info entry, and an unchanged name is a no-op (no new session_info entry).
/name keeps working as a backward-compatible alias that shares the same handler; its description says it is an alias of /rename. README, docs/usage.md, docs/sessions.md and the session tip name /rename as the canonical command.
- A keybinding action
app.session.renameCurrent (unbound by default, like app.session.new/tree/fork/resume; description "Rename the current session") is registered on the default editor and opens the same inline editor, so users can bind a key for it.
- The RPC (
set_session_name) and app-server (thread/name/set) surfaces are unchanged; remote/host runtimes work because the handler goes through session.setSessionName.
- Tests under
packages/coding-agent/test/suite/ cover the command, the alias, the inline editor commit/cancel/empty paths and the keybinding registration; changes.md trackers and the [Unreleased] changelog are updated so the changelog gate passes.
Actual
/rename is unknown to the TUI.
/name exists (packages/coding-agent/src/core/slash-commands.ts:30, handler interactive-mode.ts handleNameCommand) but has no prefilled edit form.
app.session.rename (ctrl+r) is scoped to the /resume session selector (components/session-selector.ts); in the main editor ctrl+r is app.history.search, so the OpenCode default cannot be reused globally.
Evidence
packages/coding-agent/src/core/slash-commands.ts:19-44 — builtin list, name present, no rename.
packages/coding-agent/src/modes/interactive/interactive-mode.ts:4769 — /name intercept; handleNameCommand prints usage when the argument is empty.
packages/coding-agent/src/core/keybindings.ts:125 — app.history.search = ctrl+r; :163-166 — main-editor session actions default to []; :195 — app.session.rename = ctrl+r (selector only).
- OpenCode reference:
packages/tui/src/routes/session/index.tsx (session.rename command with slash: { name: "rename" }), packages/tui/src/component/dialog-session-rename.tsx, packages/tui/src/config/keybind.ts (session_rename: ctrl+r).
Root cause
Feature gap: the session-name API exists (SessionManager.appendSessionInfo, AgentSession.setSessionName, session_info_changed event) but the TUI only exposes it through /name <name>.
Scope
In: builtin /rename, inline prefilled editor, /name alias, app.session.renameCurrent keybinding action, help/hotkeys/tips/docs, tests, trackers, changelog.
Out: renaming other sessions from the main editor (already possible inside /resume), RPC/app-server protocol changes, desktop app work (tracked in the omo-desktop-app repo).
Related
- Desktop counterpart: omo-desktop-app issue (linked in the first comment).
Summary
The interactive TUI has no
/renamecommand. Renaming the current session today requires knowing the/name <name>command; there is no argument-less form that lets you edit the existing name, and no main-editor keybinding action for it. OpenCode ships/rename(a prefilled rename prompt, plus asession_renamekeybind) and users coming from it expect the same verb. This issue tracks giving the TUI a first-class/renamefor the current session, keeping/nameas an alias.Reproduction
senpi(oromo) in any project, send one prompt so a session exists./rename— autocomplete offers nothing; submitting it reports an unknown command and the text is sent nowhere useful./namewith no argument — it only prints the current name orUsage: /name <name>; there is no way to edit the existing name in place./hotkeyslists no action for renaming the current session from the main editor (app.session.renameonly works inside the/resumepicker).Expected (ideal state / acceptance criteria)
/rename [name]is a builtin slash command: listed inBUILTIN_SLASH_COMMANDSwith an argument hint, offered by autocomplete, shown by/hotkeysand help./rename <name>sets the session display name with the same normalization/nameapplies today (newlines collapsed, trimmed), printsSession name set: <name>in the chat, and the footer shows the new name immediately./renamewith no argument opens an inline rename editor prefilled with the current session name (OpenCodeDialogSessionRenameparity): Enter commits, Escape cancels, a whitespace-only submit warnsSession name cannot be emptyand appends nosession_infoentry, and an unchanged name is a no-op (no newsession_infoentry)./namekeeps working as a backward-compatible alias that shares the same handler; its description says it is an alias of/rename. README,docs/usage.md,docs/sessions.mdand the session tip name/renameas the canonical command.app.session.renameCurrent(unbound by default, likeapp.session.new/tree/fork/resume; description "Rename the current session") is registered on the default editor and opens the same inline editor, so users can bind a key for it.set_session_name) and app-server (thread/name/set) surfaces are unchanged; remote/host runtimes work because the handler goes throughsession.setSessionName.packages/coding-agent/test/suite/cover the command, the alias, the inline editor commit/cancel/empty paths and the keybinding registration;changes.mdtrackers and the[Unreleased]changelog are updated so the changelog gate passes.Actual
/renameis unknown to the TUI./nameexists (packages/coding-agent/src/core/slash-commands.ts:30, handlerinteractive-mode.tshandleNameCommand) but has no prefilled edit form.app.session.rename(ctrl+r) is scoped to the/resumesession selector (components/session-selector.ts); in the main editorctrl+risapp.history.search, so the OpenCode default cannot be reused globally.Evidence
packages/coding-agent/src/core/slash-commands.ts:19-44— builtin list,namepresent, norename.packages/coding-agent/src/modes/interactive/interactive-mode.ts:4769—/nameintercept;handleNameCommandprints usage when the argument is empty.packages/coding-agent/src/core/keybindings.ts:125—app.history.search=ctrl+r;:163-166— main-editor session actions default to[];:195—app.session.rename=ctrl+r(selector only).packages/tui/src/routes/session/index.tsx(session.renamecommand withslash: { name: "rename" }),packages/tui/src/component/dialog-session-rename.tsx,packages/tui/src/config/keybind.ts(session_rename: ctrl+r).Root cause
Feature gap: the session-name API exists (
SessionManager.appendSessionInfo,AgentSession.setSessionName,session_info_changedevent) but the TUI only exposes it through/name <name>.Scope
In: builtin
/rename, inline prefilled editor,/namealias,app.session.renameCurrentkeybinding action, help/hotkeys/tips/docs, tests, trackers, changelog.Out: renaming other sessions from the main editor (already possible inside
/resume), RPC/app-server protocol changes, desktop app work (tracked in the omo-desktop-app repo).Related