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

agentintegrationhook eventconfig
Claude CoderewritesPreToolUse.claude/settings.json
Codex CLIrewritesPreToolUse~/.codex/hooks.json or [hooks] in config.toml
Gemini CLIrewritesBeforeTool.gemini/settings.json
opencoderewritestool.execute.before.opencode/plugin/ or ~/.config/opencode/plugin/
CursorgatesbeforeShellExecutionhooks.json
AntigravitygatesPreToolUse.agents/hooks.json or ~/.gemini/config/hooks.json
Kimi Code CLIgatesPreToolUse~/.kimi-code/config.toml
GitHub Copilot CLIgatespreToolUse.github/hooks/copilot-cli-policy.json
Any other agentshims 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.

gates

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.

shims 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.