# Coding agents

Start a coding agent in a project, see when it needs you, and pick its conversation up later.

Run the coding CLIs you already use, such as Claude Code or Codex, in your projects, and see at a glance
which one needs you. Each agent runs in its project's folder in a terminal of its own, and its row in the
sidebar shows whether it is working, waiting on you or done, as the agent itself reports.

## Start an agent

1. In the sidebar, open a project and click **+** beside **Agents**.
2. Pick an agent. With more than six, type to search and press Enter to start the first match.

The menu offers each agent once it is installed and, where needed, connected; see
[Install or connect an agent](#install-or-connect-an-agent).

> [!IMPORTANT]
> Every built-in agent starts with its own permission prompts off, so it edits files and runs commands without stopping to ask you. That comes from one argument per agent, listed under [Built-in agent CLIs](#built-in-agent-clis). If you'd rather approve each step, remove that argument from **Arguments** in the agent's **Edit** dialog in **Settings › Agents**, and the agent asks again.

Once it's started, the agent becomes one of the project's sessions, a row with a status dot. An agent starts only when you start or resume it, when a [schedule](/docs/schedules.md) you set comes due, or when
another agent opens one through the [MCP server](/docs/mcp.md), which you can switch off in
**Settings › MCP**.

## See when an agent needs you

An agent's row in the sidebar, and the footer under its terminal, show its state. The agent's
hooks report that state: its CLI tells Rundesk when it starts working, needs you or finishes, and
Rundesk never reads what the agent prints to guess.

| State | Dot | Meaning |
|---|---|---|
| **Working** | spinner | the agent reports it is working and its screen is moving |
| **Needs your input** | pulsing amber | the agent is waiting on you, such as at a permission prompt or a question |
| **Ready** | green ring | the agent's turn is over, and it is ready for your next prompt |
| **Running** | green ring | an agent without hooks, with a still screen |

A stopped agent shows a small gray dot, and one that exited with an error a red dot.

When an agent needs your response or finishes its turn while you are looking elsewhere, an alert
appears: a toast at the top right, an entry under the bell at the foot of the rail, and a system
notification while Rundesk is not the focused window. Click it to open the agent.

## Stop, resume and archive

**Stop**, or ⌘W, stops a running agent and leaves its row, stopped. When Rundesk launches, every
stored session is listed stopped, and none resumes until you press **Resume**, which reopens that
exact conversation. The stopped view shows the command that resumes it.

**Archive** stops the session and takes its row away, with **Undo** for five seconds. Archiving a
working agent asks first, unless you switch that off in **Settings › General**. The conversation
remains in the agent's own history.

## Built-in agent CLIs

Rundesk has six built-in agent CLIs. Claude Code, Codex and OpenCode get its state reporting and tools when
Rundesk launches them; Grok, Antigravity and Kimi Code take them only from their own configuration,
once you **Connect** them.

| Agent | Program | Default arguments | Needs Connect |
|---|---|---|---|
| Claude Code | `claude` | `--dangerously-skip-permissions` | no |
| Codex | `codex` | `--dangerously-bypass-approvals-and-sandbox` | no (optional, for its thread names) |
| Grok | `grok` | `--always-approve` | yes |
| Antigravity | `agy` | `--dangerously-skip-permissions` | yes |
| OpenCode | `opencode` | `--auto` | no |
| Kimi Code | `kimi` | `--auto` | yes |

Each default argument is the CLI's own switch for skipping its permission prompts, which is why a built-in agent works without asking.

Any other command you set up is a **custom agent**. It runs exactly as you set it up, with no state
reports, no resume and no saved prompt, so it shows working while its screen moves and is never shown
as waiting on you.

## Install or connect an agent

**Settings › Agents** lists every agent, where each row says `Connected`, `Installed` for a custom agent, or `Not found`, or offers
**Install** or **Connect**. Rundesk looks for the CLIs at launch and on **Refresh**, and finds one you
installed while the app was open.

- **Install** opens a dialog showing the maker's own installer and runs it in a terminal there, where
  you can answer it. When it finishes, Rundesk connects the agent if it needs it.
- **Connect** is needed for Grok, Antigravity and Kimi Code, which take Rundesk's reporting and tools
  only from their own configuration. It adds entries named `rundesk-app` there, and **Disconnect**
  removes exactly those.

## Edit, reorder and duplicate agents

In **Settings › Agents** you can reorder and hide agents, edit each one's **Name**, **Command**,
**Arguments** and, for a built-in agent that takes one, an optional **Prompt**, or add a **New agent**. A saved prompt is sent at the start
of each new conversation, never on a resume. To save a second prompt for the same CLI, choose
**Duplicate** on the agent's ⋯ menu and give the copy its own prompt.

## Agent notes that survive a compaction

A long conversation fills the agent's context, and the agent compacts it into a summary that loses
detail. Each agent shows **Agent** and **Notes** tabs, and the note is a markdown page where the agent
writes its plan as a task list, its decisions and its progress, and where you read and edit them.
Rundesk tells agents to read their note when they start, resume or come back from a compaction, so a
plan survives all three. Other agents may read it; only that session's own agent changes it. The note
goes when the session is archived.

## Run one agent CLI under a second account

To run one CLI under two accounts, one for work and one personal:

1. In **Settings › Agents**, choose **Duplicate** on the agent's ⋯ menu.
2. Under **Advanced options**, set its config folder, such as `CLAUDE_CONFIG_DIR=~/.claude-work` or
   `CODEX_HOME=~/.codex-work`.
3. Start the copy and sign in with that account the first time.

> [!WARNING]
> Environment variables are stored as plain text, so they are no place for secrets.

## Hand work to another agent

An agent can hand work to another, in the same project or another one: it opens one with
`session_open` and messages it with `session_send`, and the other replies the same way. Rundesk heads
every message with a line naming who sent it; [Guide for AI agents](/docs/for-agents.md#hand-work-to-another-agent)
has the steps. To point one agent at another yourself, right-click the other agent in the sidebar and pick
**Copy session ID**, then paste it to the first: it is the ID the session tools take. A shell's row has it too: an agent can type a command into that shell once its screen is still, never into a line you are typing, while **Terminals: Type commands** is on.

A message is never typed into an agent waiting on you, and it waits while you are typing into that
agent. Agents need the **Agents: Send messages** permission in **Settings › MCP** to send one; see
[MCP tools and permissions](/docs/mcp.md).

## Related pages

- [Schedules](/docs/schedules.md): have an agent start on its own at the times you choose.
- [Hand work to another agent](/docs/hand-off-work.md): a worked example of one agent passing work to another.
