Commands
This document is the reference for Opair's slash commands. For tools the agent can call, see the tools guide.
- How commands work
- /compact
- /document
- /driver
- /mcp
- /model
- /navigator
- /plan
- /quit
- /resume
- /review-commit
- /review-diff
- /review-pr
- Keyboard shortcuts
- Autocomplete
How commands work
A line of input that starts with /
is treated as a command
instead of a message to the agent.
Typing / in an empty input opens
the autocomplete menu.
There are two kinds:
- Builtins, handled by the interface:
/compact,/driver,/mcp,/model,/navigator,/quitand/resume. - Sub-agent commands, backed by tools:
/plan,/review-commit,/review-diff,/review-prand/document.
Arguments follow the command and support shell-style quoting:
/review-diff --staged "HEAD~1..HEAD"
With the exception of /quit,
most commands are refused while the agent is busy.
Mode switches are silently ignored instead.
An unknown command is reported as an error.
Sub-agent commands run in their own status row and their results are appended to the conversation, so the agent can act on them in the normal course of the session. Invocations are recorded in the session transcript.
/compact
/compact [--uncached]
Replaces the conversation with a summary to free up context space. The mode prompt is kept, so the agent retains its role.
By default the summary is generated
in a way that reuses the cached conversation prefix.
--uncached flattens the conversation
into a single prompt instead
and runs on the model configured
for the compactUncached role.
Prefer the uncached variant
when the prompt cache is cold anyway,
for example after switching models.
/document
/document {subject}
Runs the documentation sub-agent against the current project. The subject is what to document; the more detail, the better.
The sub-agent can read project files and create or edit files. Files it creates can be edited without re-approval for the rest of the session. It may ask you questions before writing anything.
The model comes from the document role.
See roles in the configuration doc.
/driver
/driver
Switches to driver mode: the agent drives and you navigate. The agent gains access to write tools, gated by user approval.
No-op if Opair is already in driver mode or the agent is busy. Shift+Tab toggles between modes.
/mcp
/mcp auth {server}
Signs in to an MCP server,
for example github, gitlab or atlassian.
auth is the only subcommand;
anything else is an error.
See the MCP guide for supported servers, token storage and permissions.
/model
/model [{model}]
Sets the model for the current mode, overriding the configured role for the rest of the session.
| Argument | Meaning |
|---|---|
| (none) | Clears the override and returns to the configured model. |
large or l |
The large model for the current mode. |
small or s |
The small model for the current mode. |
provider/model |
A qualified spec, e.g. zai/glm-5.3-flash. The provider must be configured. |
model |
A bare model name, searched across all providers. |
A bare name that matches several providers is rejected with the list of qualified options; pick one and try again.
Selecting a provider or model that was degraded by an auth error clears the degradation. Useful after topping up API credits. See failover and degradation.
/navigator
/navigator
Switches to navigator mode: you drive and the agent navigates. The agent loses access to write tools and instead monitors the project for changes, offering feedback as you make them. Only project files are monitored, not external files and not dotfiles within the project.
No-op if Opair is already in navigator mode or the agent is busy. Shift+Tab toggles between modes.
/plan
/plan {subject}
Runs the planning sub-agent against the current project. The subject is what to plan; the more detail, the better.
The sub-agent can read project files and git history, create plan documents and edit files it has created without re-approval. It may ask you questions to firm up the plan.
The model comes from the plan role.
See roles in the configuration doc.
/quit
/quit
Quits Opair. Works at any time, including while the agent is busy. Ctrl+D does the same thing.
/resume
/resume {session}
Resumes a previous session,
identified by its slug,
e.g. 2026-01-15-153045-fixing-auth-bug.
Session slugs are offered by autocomplete.
Resuming forks the session on disk: the fork carries the conversation and usage forward and the original stays resumable from its quit point.
You cannot resume the session that is currently open. The command is refused while the agent is busy.
The prompt cache is empty after a resume. The next message sends the entire conversation to the LLM, so expect that one to cost more.
/review-commit
/review-commit [{git show args}]
Runs the code review sub-agent
against git show output.
With no arguments,
the latest commit (HEAD) is reviewed.
Any git show args are accepted,
e.g. pass a commit hash to review that commit.
Requires git in $PATH.
The model comes from the review role.
/review-diff
/review-diff [{git diff args}]
Runs the code review sub-agent
against git diff output.
With no arguments,
the unstaged changes are reviewed.
Any git diff args are accepted,
e.g. --staged for staged changes
or a range like HEAD~1..HEAD.
Requires git in $PATH.
The model comes from the review role.
A review complements linting and testing.
It does not replace them.
/review-pr
/review-pr {pr} [{gh pr diff args}]
Runs the code review sub-agent
against a GitHub pull request.
The first argument is the PR number, URL or branch.
Remaining args are passed to gh pr diff.
Requires the gh CLI in $PATH
and access to the repository.
The model comes from the review role.
Keyboard shortcuts
| Key | Action |
|---|---|
| Shift+Tab | Toggle between driver and navigator mode. |
| Esc | Interrupt the agent. When idle, clear the input. |
| Ctrl+C | Clear the input. If it is already empty, quit. |
| Ctrl+D | Quit. |
| Shift+Enter | Insert a newline. |
Esc while an approval prompt is showing declines the pending call and cancels the in-flight work.
Autocomplete
Typing / in an empty input
shows the available commands.
Continue typing to narrow the list.
The arrow keys move the selection.
Tab completes the highlighted command
and adds a trailing space, ready for arguments.
Enter accepts the highlighted command
without the trailing space,
then a second Enter submits it.
Esc dismisses the menu.
An exact match does not open the menu,
so typing /quit and pressing Enter
quits without a detour.
/resume also autocompletes its argument.
After the command and a space,
the available session slugs are listed,
narrowed as you type.
Tab completes the selected slug
and adds a trailing space.