Allow user-defined aliases for built-in slash commands (the internal `aliases` array is not user-configurable)
Status Closed — not planned
Reported on v2.1.273
Maintainer reply None cached
Activity 0 comments · opened Sep 15, 2026 · closed Oct 9, 2026
Summary
Built-in slash commands already carry an aliases array internally, but there is no way for a user to add one. Please expose it in settings.
In 2.1.273 the /clear entry is:
type:"local",name:"clear",description:"Start a new session with empty context; previous session stays on disk (resumable with /resume)",argumentHint:"[name]",aliases:["reset","new"],supportsNonInteractive:!0,...
So /reset and /new work, but only because they are hardcoded. I wanted /end for the same thing and there is no supported way to get it.
What does not work today
- A custom command at
~/.claude/commands/end.mdis a prompt template. It injects text for the model; it cannot invoke a built-in that resets client session state. - Keybindings do not cover it. The
chat:*actions areattentionDown, attentionUp, cancel, clearInput, clearScreen, cycleMode, cycleProactivity, externalEditor, fastMode, imagePaste, killAgents, modelPicker, newline, queueSubmit, stash, submit, thinkingToggle, undo, workflowKeywordToggle.chat:clearScreenredraws the terminal and does not drop context. - Hooks do not cover it.
hookSpecificOutputcarries context injection and permission decisions, nothing that resets a session.
Suggested approach
A settings key that feeds the same alias resolution the built-in aliases array already uses:
{
"commandAliases": {
"end": "clear"
}
}
Reject an alias that collides with an existing command or built-in alias rather than silently shadowing it.
Prior issues
- #32785 — same request for
/compact, closed as not planned after inactivity, now locked. - #14576 —
/aliascommand, closed as not planned, larger scope. - #23589 — shorthand aliases for plugin commands, closed as duplicate.
Environment
- Version: 2.1.273
- Platform: darwin 25.6.0