Use Takt with agents
Installing Takt teaches the coding agents it finds on that machine. Each gets a skill that tells it when and how to use Takt, Takt’s MCP server, and two hooks: one that protects each session as it starts and tells the agent about the fleet, and one that moves heavy commands into Takt jobs. The skill comes with Takt and carries its version, so updating Takt updates it.
| You ask | The agent |
|---|---|
| “Add rate limiting and run the tests.” | Writes the code, runs takt run --name "api: tests" -- go test ./..., waits, and reads the result line. |
| “Run the iOS tests.” | Asks for --feature xcode. Takt starts a fresh macOS VM on a Mac that has room, waking it if it sleeps. |
| “Check this on Windows.” | Asks for --feature windows and gets a fresh Windows 11 VM. |
| “Start the dev server and tell me when it’s up.” | Runs it --here --detach, then takt logs <id> --until 'Listening'. |
| “Run lint and tests in parallel.” | Puts both in one --group, so a lint failure stops the tests. |
Set up
The installer does it, and so do takt join and a join line. The summary says which agents got what. --no-agents skips it.
| Agent | Skill | MCP server | Hook |
|---|---|---|---|
| Claude Code | ~/.claude/skills/takt |
claude mcp add --scope user takt -- <takt> mcp |
~/.claude/settings.json |
| Codex | ~/.codex/skills/takt |
codex mcp add takt -- <takt> mcp |
~/.codex/hooks.json |
| Cursor | ~/.cursor/skills/takt |
an entry in ~/.cursor/mcp.json |
|
| Antigravity | ~/.gemini/config/skills/takt |
||
Others reading ~/.agents |
~/.agents/skills/takt |
Start a new agent session afterwards. Sessions that were already open don’t have the skill yet.
| To | Run |
|---|---|
| Teach an agent you installed later, or update what’s there | takt skill install (--no-mcp skips the MCP server) |
| Take Takt’s skill, hooks and MCP server back out, leaving your own | takt skill remove |
| Teach the agents of everyone who works on a repository | takt init --agents: it adds .claude/skills/takt/SKILL.md and a ## Takt section in AGENTS.md |
takt uninstall also takes back exactly what Takt added. The repository has a Claude Code plugin with all of it too, in plugins/claude-code.
On Linux, the session-start hook protects each new session, so a runaway job is stopped before the session is. Outside a hooked agent, start a session protected yourself:
takt agent -- claude # or, inside a running session: takt protect --self
Agents on any joined machine submit to the whole fleet. See How Takt works.
Trusting the hook in Codex
Codex runs a hook from ~/.codex/hooks.json only once you trust it, and skips it until then. Takt can’t record that trust for you.
So after Takt adds or changes its hooks, start codex and choose Trust all and continue when it says hooks need review. Or open /hooks and trust takt hook pre-tool and takt hook session-start. A one-off codex exec --dangerously-bypass-hook-trust runs hooks without trust, for that run only.
Check it’s working
takt skill status
Claude Code (found)
skill current ~/.claude/skills/takt/SKILL.md
mcp registered ~/.claude.json
hook current ~/.claude/settings.json
Codex (found)
hook untrusted ~/.codex/hooks.json: Codex runs them once you trust them in /hooks
| State | Means |
|---|---|
current, registered |
In place, and matches this Takt |
outdated |
From another version of Takt: takt skill install updates it |
missing |
Not there: takt skill install adds it |
untrusted |
Codex won’t run the hook until you trust it in /hooks |
foreign |
Something else is at that path, and Takt leaves it alone |
unsupported |
This agent has no such thing |
It ends with the command that fixes what it found, and exits 1 when something needs fixing. --json gives the same for scripts. takt hook check checks the hooks alone, and takt doctor runs the same checks along with this machine’s and the project’s.
Then ask your agent to run the project’s tests. It should run them with takt run, and the job shows up in takt status and on the dashboard.
The hook
The skill tells agents what to send to Takt. The hooks make sure, even when an agent forgets: one protects each session as it starts and tells the agent about the fleet, the other moves heavy commands into Takt jobs. See The hooks for what they do, how git hooks are handled, and how to turn them off.
Projects need an image
A project’s jobs run on any machine only when it has an image: a .devcontainer/ or a Dockerfile. Without one, they run only on the machine that sent them. Your agent adds one when it needs it. See Project images.
What an agent gets
- A blocking run.
takt runwaits for the job and exits with its code. The MCPruntool answers inline when the job ends within 10 seconds, andwaitwaits up to 9 minutes a call. Agents never poll. If the agent goes away, its job is cancelled;--detachjobs keep running. - A line from a running job.
takt logs <id> --until '<regex>'(MCPlogswithuntil) returns as soon as a line matches, such as a dev server’s ready line. - Its own changes. Each job ships the agent’s working tree as a git snapshot, uncommitted changes included. Takt never touches your branches.
--with ../libships another local repository beside it, for an app built against a library that isn’t pushed yet. - Shared identical runs. Two agents asking for the same command on the same snapshot, with the same features, environment and setup, share one run. Each gets its artifacts.
--no-cacheruns afresh. -
Groups that fail fast. Jobs with the same
--groupare cancelled on every machine as soon as one fails:UNIT=$(takt run --detach --group check-1 -- go test ./... | awk '{print $1}') LINT=$(takt run --detach --group check-1 -- golangci-lint run | awk '{print $1}') takt wait "$UNIT" & takt wait "$LINT" & wait - Supersede. A newer job with the same
--supersedekey cancels the older one, queued or running. - Sizing feedback. The result line says what the job used against what it asked, with a hint when it asked for far too much. Leave the size out and Takt sizes the job from its history.
- Artifacts.
--artifact <path, glob or folder>copies files back to the working directory when the job ends, passed or failed. A failed job also brings back up to 10 screenshots its log names undertmp/screenshots/ortmp/capybara/. - Failure hints. When a failed job’s log shows what it lacked, the result says how to run it again. A darwin job missing
XCTestorxcodebuildgets--feature xcode. - Scripts that use Takt themselves. A
takt runinside a Takt job (a project’sbin/cithat sends its steps to Takt) runs in that job, under its limits, unless it asks for something that job may lack.
A --here job that starts containers runs its work in Docker’s processes: its result says so, and the run sizes nothing. On Linux those containers still count toward its memory cap. See containers a --here job starts.