---
title: "Slash commands"
description: "Control runs, switch models, and manage threads directly from the composer."
canonical_url: "https://hoplite.sh/docs/agent/slash-commands"
markdown_url: "https://hoplite.sh/docs/agent/slash-commands.md"
---

# Slash commands
URL: /docs/agent/slash-commands
LLM index: /llms.txt
Description: Control runs, switch models, and manage threads directly from the composer.
Related: /docs/threads, /docs/agent/models

# Slash commands

Type `/` in the composer to pull up quick actions. Commands act directly on the current [thread](/docs/threads) — no need to phrase them as a request to the agent.

| Command | What it does |
| --- | --- |
| `/pr` | Create a draft pull request from the thread's diff, or open the existing PR |
| `/model` | Switch the [model](/docs/agent/models) for the next run (opens the model picker) |
| `/retry` | Queue a new run, or resume a paused local run, in the existing workspace; does not restore a checkpoint |
| `/stop` | Request cancellation for the run you're viewing; **Stopping** remains visible until the worker finishes stopping the run. During workspace setup, the agent stops at once; while the workspace is still being created, the run finishes stopping once it is ready |
| `/compact` | Summarize older context to free tokens |
| `/rename <new title>` | Rename the thread, overriding the generated title |
| `/note <text>` | Pin or edit a note on the thread |
| `/goal <completion condition>` | Work toward a verifiable condition across multiple runs |
| `/goal` | Show the current goal |
| `/goal pause` | Pause automatic goal continuation |
| `/goal resume` | Resume the current goal |
| `/goal clear` | Remove the goal and prevent further automatic continuation |
| `/archive` | Archive the thread |
<Callout type="info" title="/compact and the context gauge">
The context gauge in the thread header shows how much of the model's context window is in use. When a long thread starts running out of room, `/compact` folds older messages into a summary so the agent keeps the important context and sheds the bulk.
</Callout>

<Callout type="info" title="Local agent goals">
Local Codex sessions provide `/goal <completion condition>` in their provider-command menu. Use `/goal` to inspect the active goal and `/goal clear` to stop it.
</Callout>

## Cloud goals

Set a goal in an existing cloud thread, for example `/goal all authentication tests pass and lint is clean`. Hoplite saves one goal per thread and starts work immediately. If work remains after a run, Hoplite queues another run in the same workspace through the normal permission and billing checks.

How completion is decided depends on the thread's model, so each model follows the goal loop its vendor built it for:

- **Claude and most other models** work the way Claude Code's `/goal` does. After each successful run, a separate tool-free evaluator reads the conversation and decides whether the condition holds. When it does not, the evaluator's reason goes back to the agent as stop-hook feedback and the agent keeps working. The agent cannot mark the goal finished itself.
- **GPT models** work the way Codex goals do. The agent gets `get_goal` and `update_goal` tools, and every automatic run carries Codex's continuation instructions, including its completion audit. The goal ends when the agent calls `update_goal` with `complete` or `blocked`. If it ends a run without doing so, Hoplite continues the goal.

Use `/goal -- <completion condition>` to set a literal condition such as `pause` or `clear` instead of invoking a control command. The word `objective` is ordinary goal text, not a subcommand.

The goal bar above the composer shows the current goal and its state, and its buttons edit, pause, resume, or delete it. Those changes update the bar rather than adding chat messages. When you start a goal, your condition appears once as your message and the agent starts on it. If a run is already in progress, the agent starts on the goal when that run finishes. A resume shows a "Goal resumed" divider. `/goal` on its own still replies with the current status. Automatic runs use the model, reasoning effort, and speed that the goal was started or resumed with.

Automatic continuations appear as **Goal not met, continuing** notices rather than
messages attributed to you. They aren't removable queued follow-ups; pause or
clear the goal to prevent subsequent automatic runs.

The goal stops continuing when the condition is met, it is found impossible or blocked, a run fails or is stopped, its automatic-turn or token budget is exhausted, or too many automatic runs in a row make no tool calls (3 for GPT models and 8 for others). Pausing or clearing a goal prevents subsequent automatic runs; it does not interrupt a tool already executing. Use `/stop` to cancel the current run. Goal work and evaluation consume the workspace's normal model budget and do not grant additional tool permissions.

The opt-in `apps/api/src/__tests__/cloud-goal-e2e.integration.test.ts` exercises a real worker and evaluator. Run it only against a disposable existing cloud thread with working model, repository, sandbox, and billing configuration. Set `RUN_CLOUD_GOAL_E2E=true`, `HOPLITE_GOAL_E2E_API_URL` (the service origin), `HOPLITE_GOAL_E2E_THREAD_ID`, and `HOPLITE_GOAL_E2E_COOKIE` (an authenticated session cookie); set `HOPLITE_GOAL_E2E_ORIGIN` when the allowed browser origin differs from the API origin. This test starts billable work and clears the goal afterward.

## Sitemap

Sitemap discovery is not enabled for this deployment.
