Start an agent on a task in Sledbot
Start a coding agent in Sledbot: open New task, pick the agent, model and account, work in a git worktree, compare agents, and resume after a restart.
Updated 8 min read
On this page
To start an agent in Sledbot, press ⌘T (Command-T) to open New task, describe the task, pick an agent, and press ⌘↩ (Command-Return). In a git repository the agent works in its own worktree by default, so your checkout stays as it is. This page covers each option on the New task page, the agents Sledbot supports, and how restarting works.
Before you start
- A license or an active trial. After the 7-day trial, agents that are already running keep going. Starting or restarting an agent opens the license window instead ("Sledbot needs a license to start agents.").
- A space. Agents run in a project folder you have added to the sidebar. Use File ▸ Add Project Folder… (⌘O), drag a folder onto the sidebar, or create one with New Project… (⇧⌘N).
- An agent CLI, such as Claude Code or Codex, on the machine where it will run. You can install one from inside Sledbot (see below). The native Sledbot agent needs an API key or a local model instead. See AI providers, accounts and fallback.
Open New task to start an agent
Use any of these:
- File ▸ New Agent…, or ⌘T
- The New agent + button in the toolbar
- ⌘K, then New task…
- The New task button in an empty space
- The + at the end of a space's tab strip
The page is titled New task. Cancel (Esc) closes it.


Write the task
Type what you want done in the prompt field, for example "Fix the flaky login test and explain the root cause".
- Mention a file: type
@to open the file picker. Use ↑↓ to move, ↩ or Tab to insert, and Esc to close. - Paste a screenshot or files: pasting images or files inserts their path into the prompt.
- Reuse a prompt: Recent lists the last 5 prompts used in this space. An empty space also shows up to 3 recent prompts with Run again.
Sledbot passes the task to the agent as a command-line argument or flag. It doesn't type it into the agent's interface.
To start, click the ↑ button or press ⌘↩. Progress shows as "Creating worktree", then "Launched <agent>", then "Waiting for the agent". If the launch fails, choose Back to edit or Try again.
Choose the agent, model, account and teammate
Chips below the prompt set where and how the agent runs:
| Chip | What it sets |
|---|---|
| Space / folder, branch, machine | Where the agent works. |
| Agent | Lists installed Agents, Shell (a plain terminal, no agent), and Not installed agents with Install…. The default is the agent you used last, or Claude Code if you haven't used one yet. |
| Model | Opens Search models. Shown only for agents that accept a model. With no providers set up it reads "No models yet." and offers Open Settings…. |
| Account | Default account, or another account you added in Settings ▸ Accounts. |
| Teammate | No teammate, or hand the task to a teammate. Progress then reads "Handing it to <name>". |
Work in a new worktree
Work in a new worktree is on by default when the space is a git repository. The agent gets "a separate checkout on its own branch, so your files stay as they are."
- Branch name: the field suggests a name starting
agent/…, branched "from<base>". Edit it, or click Use suggested name. A name git won't accept shows "Not a valid branch name". - Location: the worktree is created at
<repo>/.sledbot/worktrees/<branch>, with any/in the branch name replaced by-. Sledbot adds.sledbot/to.git/info/exclude, so these folders don't show up ingit status. - With the toggle off, the agent works in the space's folder itself, on your files.
Closing a running agent's tab stops it, but its worktree and files stay. Look over what it did with Review changes (see Review an agent's changes). Remove old worktrees with the space's Clean up worktrees….
Set up each worktree automatically
Add .sledbot/config.json or sled.json at the repository root to give worktrees setup, run and archive scripts:
{"setup": ["npm ci"], "copy": [".env"], "run": "npm run dev -- --port $SLED_PORT", "archive": "docker compose down"}Terminals in a worktree get SLED_PORT (plus SLED_PORT_1 to SLED_PORT_9), SLED_WORKTREE, SLED_ROOT, SLED_BRANCH and SLED_CONTEXT. Using $SLED_PORT in your run script lets each worktree's dev server use its own port. From a terminal, sled worktree info|create|setup|run|archive drives the same scripts.
Advanced options
Open Advanced on the New task page:
| Option | What it does |
|---|---|
| Role template | Starts the agent with a role, for example reviewer. Built-ins: lead, reviewer, tester, fixer, docs, release. Your own go in ~/.config/sledbot/templates. |
| Environment | Extra environment variables, one KEY=value per line. |
| Keep: reopen a shell here if the process is lost | If the agent's process disappears, a shell opens in its folder. Off by default. |
The quick New agent sheet
For a faster start, press ⌘K and choose New agent (quick). The compact sheet has pickers for the agent, location, teammate and account, plus Worktree (on), Branch and Advanced. Press ⌘↩ or click Start. Use More options… when you need the rest of the New task options.
Supported CLI agents
Sledbot runs 16 agent CLIs through their own logins, plus its native agent and a plain shell.
| Agent | Command | Login command | Any model | MCP servers added | Approvals | Resume command |
|---|---|---|---|---|---|---|
| Claude Code | claude | claude | No | Yes | Blocks | claude --resume <id> |
| Codex CLI | codex | codex login | No | Yes | Detect and answer | codex resume <id> |
| Gemini CLI | gemini | gemini | No | Yes | Detect and answer | gemini --resume <id> |
| GitHub Copilot CLI | copilot | copilot | No | No | Detect and answer | copilot --resume=<id> |
| Cursor CLI | cursor-agent | cursor-agent login | No | No | Detect and answer | cursor-agent --resume <id> |
| Grok CLI | grok | none | No | No | Detect and answer | grok --resume <id> |
| Amp | amp | amp login | No | No | Detect and answer | amp threads continue <id> |
| OpenCode | opencode | opencode auth login | Yes | Yes | Detect and answer | opencode --session <id> |
| Crush | crush | none | Yes | Yes | Detect and answer | none |
| Goose | goose session | goose configure | Yes | Yes | Detect and answer | goose session --resume (latest only) |
| Aider | aider | none | Yes | No | Detect and answer | none |
| Qwen Code | qwen | qwen | No | Yes | Detect and answer | qwen --resume <id> |
| Kimi CLI | kimi | kimi | No | No | Detect and answer | kimi --session <id> |
| Kiro CLI | kiro-cli chat | kiro-cli login | No | No | Detect and answer | none |
| Droid | droid | droid | No | No | Detect and answer | droid --resume <id> |
| Pi | pi | pi | No | No | Detect and answer | pi --session <id> |
| Sledbot (native) | sled chat | none | Yes | No | Blocks | none |
| Shell | $SHELL | none | n/a | No | n/a | n/a |
How to read the columns:
- Any model: the agent accepts a model choice, so the Model chip appears.
- MCP servers added: integrations you enable in Settings ▸ Integrations are written into the agent's own MCP config at launch. See MCP integrations.
- Blocks: risky actions wait for your OK before they run.
- Detect and answer: Sledbot mirrors the agent's own on-screen permission prompt as a card and answers it by typing keys. It can't stop an action the agent runs without asking. See Needs you and approvals.
- Resume command: how Sledbot continues the conversation after a crash or reboot (see below).
You can add or hide presets in ~/.config/sledbot/agents.json. Entries are merged by id, and {"id":"x","remove":true} hides a built-in agent.
Install, log in to and update agents
From New task: pick a Not installed agent and choose Install…. Confirming "Install <Agent>?" runs the vendor's install command in a terminal. If Sledbot doesn't know the command, it tells you; install the agent following its own documentation, then come back.
From Settings ▸ Agents:
- Open Settings (⌘,) and choose Agents.
- Pick the Machine: This Mac or a remote machine.
- Under Coding agents, find the agent. Each row shows its vendor and version, or "not installed".
- Click Install…, Log in… or Update…, then confirm.
The command runs in a terminal pane on that machine, so device-code and browser login flows also work on remote machines.
Sledbot finds agents with one login-shell lookup and caches the result for 60 seconds. If you just installed an agent and it still shows as missing, click Refresh.
Compare agents on the same task
Compare runs one task with 2 to 4 agents side by side, each in its own worktree.
- Choose Agents ▸ Compare Agents…, or press ⌘K and choose Compare agents….
- Write the task and pick the agents.
- Click Start N agents.
They open side by side in one tab, each on its own branch named compare/<slug>-<agent>-<n>. Review each one when it's done. The space must be a git repository; if it isn't, the sheet shows "<space> isn't a git repository, so agents can't get separate worktrees."
Restart and resume an agent
Agents run in Sled Core, a background engine, so quitting Sledbot doesn't stop them.
- Restart a stopped agent: click Restart in the agent's header or the terminal's exit bar, or press ⇧⌘R (Shift-Command-R) in its terminal. Sledbot restarts it with its conversation where possible.
- After a crash or reboot: agent terminals are kept by default. If an agent's program is gone, the next core start runs that agent's resume command in the same folder, with the same environment and labels, and reports, for example, "Resumed Claude Code session". Without a session ID, it resumes the latest session in that folder only when no other kept terminal of that agent shares the folder. Otherwise, or if resuming fails, it opens a shell.
- Turn resume off: set
SLED_NO_RESUME=1for Sled Core, or opt one terminal out of being kept withsled label <t> sled.keep=off.
If it doesn't work
- "Sledbot needs a license to start agents." The trial has ended. Choose Enter License… in the app menu, or Buy on the trial card.
- "
<Agent>isn't installed on this Mac." Install it from the agent chip or Settings ▸ Agents, then click Refresh. - Agent installed but not found, or the wrong Node version runs. Check that Load ~/.zshrc when starting agents is on in Settings ▸ General (it is by default). With it on, agents start through an interactive login shell, so nvm and asdf paths work. This setting applies to this Mac only.
- "Couldn't create the worktree: …" or "Not a valid branch name". Change the branch name, or turn off Work in a new worktree.
- No Model chip. The agent doesn't accept a model choice; only agents marked "Any model" in the table show it. If the chip says "No models yet.", add a provider in Settings ▸ Providers.
- "Can't restart
<name>with its conversation". Sledbot couldn't resume that conversation. Start a new task in the same space instead.