Slash command

A command typed into an agent's prompt that starts with `/`, such as `/login` or `/compact`, and runs a built-in action instead of going to the model.

Updated November 23, 2026

Slash commands are how terminal agents expose settings and actions without leaving the chat: sign in, switch model, compact the context, manage MCP servers, review a diff. Many agents also let you define your own as Markdown files.

On a phone keyboard, the slash is often one tap away, which makes slash commands the easiest way to drive an agent from a touch screen.