---
title: "Run a thread"
description: "Run repository tasks, steer active work, and continue in the same workspace."
canonical_url: "https://hoplite.sh/docs/threads/run"
markdown_url: "https://hoplite.sh/docs/threads/run.md"
---

# Run a thread
URL: /docs/threads/run
LLM index: /llms.txt
Description: Run repository tasks, steer active work, and continue in the same workspace.
Related: /docs/threads/review, /docs/sandboxes, /docs/agent/slash-commands

# Run a thread

Start coding work from a project's repository and selected branch or PR. Hoplite prepares the cloud workspace before running the agent, then reuses it for later messages so you can build on the work already done.

## Send messages while the agent works

You don't have to wait for a run to finish. In workspaces with the new guidance rollout, **Enter** guides an active run without stopping it; press **Command+Enter** on macOS or **Control+Enter** on other platforms to queue the message for a later run. Outside that rollout, **Enter** queues and **Command+Enter** or **Control+Enter** steers by interrupting the active run. The **Queued** panel lets you edit or remove a waiting message, or guide it into the current run when guidance is enabled. Accepted guidance appears as an ordinary message in the conversation, without a separate steering badge or acceptance receipt. When no run is active, Enter starts a new run.

## Stop and steer

Type `/stop` to request cancellation for the run you're viewing. Hoplite shows **Stopping** until the worker finishes stopping the run, and messages sent afterward queue for the next run. You can also stop a run while its workspace is still being set up: the agent stops at once. While the workspace is still being created, **Stopping** stays visible until it is ready.

The activity timeline keeps the final workspace-setup result after it settles.
When setup fails and setup output is available, expand that entry to read its
redacted output tail and find the failing stage before retrying the thread or
correcting the project's setup configuration.

## Run safety limit

A run stops after 1,000 completed model/tool cycles to prevent an unbounded tool
loop. Its final notice warns that the task may be unfinished. Review the saved
work and send a new message in the same thread to continue. An active goal does
not automatically continue after this safety stop.

## Retry a run

`/retry` queues a new run in the same thread and workspace, or resumes a paused local run. It does not restore a checkpoint. It requires no active run and remains subject to billing and execution access. For a failed setup, retry requests setup repair before agent execution resumes.

A thread that stopped because the workspace ran out of credits waits for a retry; adding credits does not restart it automatically. Retry it from the thread, or, as an owner or admin, use **Retry all** on [the billing page](/docs/workspace/billing#top-ups) to retry the threads that stopped for credits in the last 14 days. Retry all skips other members' private threads and threads that run on a local agent host; retry those from the thread itself.

Retry does not roll back the filesystem. To restore saved workspace state through the API, [list checkpoints](/docs/api/listThreadCheckpoints) and explicitly [restore the selected checkpoint](/docs/api/restoreCheckpoint). Inspect the checkpoint before replacing current work.

## Save work after an out-of-credits stop

A run that stops because the workspace ran out of credits never reaches the agent's own commit step, so its edits exist only in the sandbox. When that happens and the workspace has uncommitted files, the failed-run card lists them with a **Commit changes** button. Choose a target branch (the checked-out branch by default) and a commit message, and Hoplite commits and pushes through the GitHub App; this spends no inference credits. The dialog warns when the target is the base branch, a push GitHub refuses leaves the changes uncommitted for another attempt, and a change list too long to show in full can't be pushed from the dialog.

## Attach files

Drop, paste, or pick files in the composer:

| Rule | Detail |
| --- | --- |
| Count | Up to **10 attachments per message** |
| Size | Up to **50 MB each** |
| Images | Render inline and pass to the model as vision input, on models that support images |
| Other file types | Attach as links the agent can read from the sandbox |
| Long text pastes | Automatically convert to a `.txt` attachment so they don't flood the conversation |

## Manage the context window

A **context gauge** shows how much of the model's context window the thread has used. When it fills up, type `/compact` to summarize older context and free tokens. If a model or preflight check rejects a run because the context is already too large, Hoplite automatically compacts once and retries that model step instead of immediately failing the run.



Slash commands like `/stop`, `/retry`, and `/compact` are covered in full at [Slash commands](/docs/agent/slash-commands).
