> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bricks.tools/llms.txt
> Use this file to discover all available pages before exploring further.

# Commands

> Built-in slash commands for the AI agent

Commands are built-in actions you can invoke from the chat input bar. Like [skills](/ctor/reference/skills), commands are triggered with `/`, but instead of referencing reusable instructions they perform an action on the session directly.

## Using commands

Type `/` at the start of the chat input bar to open the slash popup. Built-in commands appear first with a **built-in** tag, followed by installed skills. Select a command to insert it into the input, or finish typing and submit it as a normal message.

Commands must be the first token of your message. Typing `/compact` after other text — such as "what does /compact do?" — is treated as plain text and the command is not run.

If you submit a command while the agent is still streaming, CTOR queues it and runs it at the next turn boundary instead of dropping it.

## Available commands

### `/compact`

Manually compact the current session's conversation history. Use this when you want to free up context before hitting the automatic compaction threshold — for example, before kicking off a long sub-task.

CTOR replaces older messages with a summary while keeping the most recent turns intact. The summary message appears in place of the compacted history; subsequent messages continue against the shorter context.

**Follow-up prompt.** You can chain a prompt onto the same submission:

```
/compact then explain what we did
```

CTOR runs compaction first, then sends the trailing text as a new prompt against the compacted history.

**Availability.** The slash popup probes whether the current session is long enough to produce a useful cut. When it isn't, the `/compact` entry is hidden from the popup — you can still type it manually, but nothing will happen if there's no cut point.

**Editing a previous message.** Rewriting an earlier user message to `/compact` and submitting the edit compacts the conversation up to that message. The edit form discards any trailing text after `/compact` to avoid splitting the action across two operations.

### `/goal`

Set a persistent objective for the current session. The agent works toward the goal automatically, evaluating progress after each turn and continuing until the objective is complete.

```
/goal Build a login page with email and password fields
```

CTOR sends the objective as the first prompt and starts working. After each agent turn, a lightweight evaluation checks whether the goal is complete:

* **Complete** — the goal is marked done and a completion notification appears in the chat.
* **Incomplete** — CTOR records the current progress reason, increments the turn count, and automatically sends a continuation prompt so the agent keeps working.

The goal persists outside the message list, so it survives `/compact`, automatic compaction, and message edits. Normal follow-up messages and steering do not clear it.

**Status bar.** While a goal is active, a status row appears above the input bar showing the objective text, elapsed time, turn count, and the latest progress reason. The row includes **Status** and **Cancel** buttons.

**Checking status.** Type `/goal` with no argument to append a status notification to the chat:

```
/goal
```

**Cancelling.** Type any of the following to cancel the active goal and stop automatic continuations:

```
/goal cancel
/goal clear
/goal stop
/goal off
/goal reset
/goal none
```

You can also click the **Cancel** button on the status bar.

**Queuing.** If you submit `/goal <objective>` while the agent is streaming, CTOR queues it and starts the goal at the next turn boundary. Status and cancel actions run immediately even during streaming.

### `/plan`

Enter [plan mode](/ctor/reference/plan-mode) to draft an implementation plan before the agent touches code. The session becomes read-only — file writes are restricted to `plan/`, shell commands run in a read-only sandbox, and MCP tools are blocked — until you approve the plan.

**With a task description.** Append a task to start planning immediately:

```
/plan add dark mode support to the settings page
```

The agent explores the codebase, writes a structured plan to `plan/`, and presents it for your approval.

**Without a task.** Type `/plan` alone and the agent asks what you want to plan.

**Running a saved plan.** Implement a plan you saved earlier with `/plan execute` (or `/plan run`) followed by its path:

```
/plan execute plan/2026-06-12-dark-mode.md
```

This runs in a normal read-write session rather than entering plan mode: the agent reviews the saved plan, then implements it. The path is relative to the project root.

**Exiting.** Type `/plan exit` (or `off`, `cancel`, `stop`, `quit`) to leave plan mode without approving a plan. You can also click **Exit plan mode** on the indicator bar below the messages.

<Card title="Plan mode" icon="list-check" href="/ctor/reference/plan-mode">
  See plan mode for the full workflow: reviewing, approving, progress tracking, and enforcement details.
</Card>
