# 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.

## Keep reading

- [Agent hooks](https://envhaven.com/glossary/agent-hooks)
- [Context compaction](https://envhaven.com/glossary/context-compaction)
- [CLI coding agent](https://envhaven.com/glossary/cli-coding-agent)

Source: https://envhaven.com/glossary/slash-command
