Docs

Automations

Caret can send prompts by itself on a schedule or when a webhook is called, run your project's commands from a button or after each turn, and give agents its own tools.

Schedule a task

Open Settings → Schedules (or ⌘K → Scheduled tasks) and click New task…. Tasks belong to a machine: with servers, pick which one at the top. Each machine runs its own tasks, so a task on a server runs while your Mac is asleep or closed.

A task has:

  • Name: named from the prompt's first line if you leave it empty.
  • Prompt: what's sent each time.
  • When:
    • Every N minutes, hours or days.
    • At a time, on the days you pick (Every day, Weekdays, Weekends, or each day by hand), on the machine's clock.
    • Once, at a date and time.
    • On webhook (below).
  • Where:
    • A new thread each run: no project or one of the machine's projects, the checkout or a new worktree each run, and the agent, model and mode.
    • Into “a thread”, for a task made from a thread: each run is a new turn there. If the thread is busy, the run waits for its turn to end.

Each task in the list has an on/off switch, Run now, Edit and Delete. Click a task for its runs: when, how each ended, and Open thread.

A time missed while the machine slept or the engine was off runs once when it's back, and says how many times it was due. A run's message in the transcript is marked Automation, with the task's name; click it to open the task.

Schedule a task for one thread

⌘K → Schedule a task for this thread…, or the thread details card (⇧⌘B) → More → New task for this thread…. The card lists the thread's tasks with Run now and Edit.

Run a task from a webhook

Pick On webhook under When. Once saved, the task's history shows its URL, with Copy and Rotate (a new URL; the old one stops working).

The URL is on the engine's own listener, on 127.0.0.1 only. A sender elsewhere (GitHub, say) needs a tunnel to it that you run yourself.

The webhook's settings:

  • Check a signature: a shared secret, the header (GitHub's X-Hub-Signature-256 by default), a prefix, and Hex or Base64.
  • Filters: run only when a JSON field, a header or the event equals, isn't, starts with, is one of, or is there.
  • Repeats: run for every delivery, or skip repeats by delivery id or by body, for 7 days.
  • Coalesce bursts: wait out a window (10 seconds to an hour) and run once with the latest payload, per key.

In the prompt, {{payload}} is replaced by the request's body and {{event}} by its event name. Without {{payload}}, the body goes after the prompt.

The task's history lists every delivery: its outcome, HTTP status, event, size and why.

Add project actions

Project actions are your project's commands, run from the thread details card (⇧⌘B): a dev server, tests, a build. The button runs the action you used last (with a green dot while it runs; click to restart it), and its menu lists the rest, with Add action…, Import from t3.json and Edit actions…. ⌘K lists them too ("Run …").

An action runs in a terminal in the drawer, in the thread's folder (its worktree, or the checkout). Running it again restarts it.

Write them in caret.json

Put a caret.json in the repository's root to share actions with everyone who uses the repository:

{
  "actions": [
    { "id": "dev", "name": "Dev server", "command": "npm run dev", "icon": "play",
      "cwd": "web", "env": { "PORT": "5173" },
      "preview_url": "http://localhost:5173", "keybinding": "mod+shift+r" },
    { "id": "test", "name": "Test", "command": "npm test", "icon": "test", "run_on_settle": true },
    { "id": "deps", "name": "Install", "command": "npm install", "setup": true }
  ]
}
FieldWhat it does
idThe action's name for shortcuts (script.dev.run); made from the name if left out
nameThe button's label
commandRun with /bin/sh -c
iconplay, test, lint, configure, build or debug
cwdA folder, relative to the thread's folder
envVariables set for the command
preview_urlThe page it serves; when its server starts, Open preview offers it in the Browser
run_on_settleRun after each of the thread's turns completes
setupRun when a thread's new worktree is made, before the agent starts
keybindingA shortcut for it, as in keybindings.json

The command gets CARET_PROJECT_ROOT, CARET_WORKTREE_PATH, CARET_THREAD_ID and CARET_ACTION_ID in its environment.

T3 Code's t3.json reads as it is (its scripts, runOnSettle, runOnWorktreeCreate and previewUrl), so you can keep it or copy it over. The files are read on every run, so an edit applies at once; Caret never writes them.

Add actions of your own

Add action… opens a dialog with Name, Shortcut, Command, Icon, Folder, Preview URL, Environment (KEY=value lines), Run when the thread settles and Run when a worktree is created. Save for this project or every project on this machine. These are kept in the machine's settings, not in the repository. Editing an action from caret.json saves your own version over it; the file isn't changed.

Settings → Projects → Actions lists every action of a project with where it comes from, with Edit, Delete or Hide.

Run an action after every turn

An action with run_on_settle (or Run when the thread settles) runs in the thread's folder shortly after each of its turns completes: not after a stopped or failed turn, and never in side chats. Use it for a formatter, a test run or a build.

Let agents use Caret's tools

Each machine's engine runs an MCP server on 127.0.0.1. The agents Caret starts are given it by themselves, with tools to start and read other threads, delegate tasks, manage projects and worktrees, schedule tasks, link and watch pull requests, and open pages in the thread's Browser. An agent can never do more through it than its own thread's mode allows.

  • In a Supervised or Auto-accept edits thread, the agent asks the first time it uses each of Caret's apps (threads, projects, the Browser, scheduled tasks, pull requests): Allow once, Allow for this session, Always allow or Decline. Settings → Access → Apps agents may always use lists what you always allowed, with × to ask again.
  • In Auto and Full access threads it goes ahead.
  • Settings → Access → Give agents the MCP server turns it off. Settings → Browser → Let agents use the Browser turns off just the Browser tools.

An agent outside Caret (Claude Code or Codex in your own terminal) can use it too. Copy the URL from Settings → Access → MCP server, and add it to the agent, for example:

claude mcp add --transport http caret http://127.0.0.1:7465/mcp

When the agent signs in, Caret shows a card asking whether to let it in, and up to which mode. Its access lasts 30 days; Settings → Access → Outside agents lists it, with Revoke. A server's MCP server is on that server's own loopback, so only agents on the server reach it.