Configure tman with your AI coding agent
An agent that starts a test suite and then hangs, gets distracted, or survives a machine suspend leaves processes draining your system for hours. tman wraps every run with hard limits and a reaper. How you attach it depends on one thing: whether your agent's pre-tool hook canreplace a command, or only allow and deny it.
Pick your agent
| agent | integration | hook event | config |
|---|---|---|---|
| Claude Code | rewrites | PreToolUse | .claude/settings.json |
| Codex CLI | rewrites | PreToolUse | ~/.codex/hooks.json or [hooks] in config.toml |
| Gemini CLI | rewrites | BeforeTool | .gemini/settings.json |
| opencode | rewrites | tool.execute.before | .opencode/plugin/ or ~/.config/opencode/plugin/ |
| Cursor | gates | beforeShellExecution | hooks.json |
| Antigravity | gates | PreToolUse | .agents/hooks.json or ~/.gemini/config/hooks.json |
| Kimi Code CLI | gates | PreToolUse | ~/.kimi-code/config.toml |
| GitHub Copilot CLI | gates | preToolUse | .github/hooks/copilot-cli-policy.json |
| Any other agent | shims only | — | .tman.kdl + AGENTS.md |
rewrites
The agent's pre-tool hook can replace the command before it runs, so a bare npm test becomes a supervised one with no cooperation from the model.
Claude Code
Native PreToolUse rewrite — tman ships the hook, no adapter needed.
AnthropicCodex CLI
Same PreToolUse payload as Claude Code — the shipped hook drops straight in.
OpenAIGemini CLI
BeforeTool hook merges a replacement command into the tool arguments.
Googleopencode
A plugin mutates the bash tool's arguments in tool.execute.before.
open sourcegates
The hook can allow, ask, or deny — but not rewrite. tman still decides whether the command runs; getting it supervised takes a shim or a denial the model can act on.
Cursor
beforeShellExecution can allow, ask, or deny — but not rewrite.
AnysphereAntigravity
PreToolUse gates run_command; hooks receive the call but cannot modify it.
GoogleKimi Code CLI
PreToolUse hooks in config.toml; rewriting is undocumented, so shim first.
Moonshot AIGitHub Copilot CLI
preToolUse allows or denies only; policy file lives in .github/hooks/.
GitHubshims only
No documented pre-shell hook. Supervision comes from PATH shims plus a line in the project's instruction file, which is enough for anything invoked through a shell.
Then tune the caps
Attaching tman decides that a command is supervised. What the caps should be depends on the command — a cold Rust build is silent for minutes, a Playwright suite leaks browsers, a dev server must never get a wall-clock limit at all. Thetuning guides cover one test, lint, and build tool per page, with the reasoning behind each number.
Frequently asked
Which AI coding agents can tman supervise?
All of them. Agents whose pre-tool hook can replace a command — Claude Code, Codex CLI, Gemini CLI, opencode — get automatic rewriting of bare test commands. Agents whose hook can only allow or deny — Cursor, Antigravity, Copilot CLI, Kimi — get a denial that names the supervised command. Everything else is covered by PATH shims, which sit below the agent entirely.
Do I need a hook at all?
No. `tman init --shims` writes supervised entry points at the repository root that any shell lookup resolves, which covers anything that shells out — an agent, a Makefile, a CI step, or you. Hooks close the remaining gap where an agent invokes a command directly rather than through a project script.
Can a tman hook break my build?
The shipped Claude Code hook cannot: every failure path leaves the command exactly as written, and it never returns the exit code that signals a block. The gate-tier adapters can deny a command by design, which is why they are scoped to what tman itself classifies as supervisable test or build work in an adopted project.