skip to content
agentmash get started

claude code and cursor on one team.

a Cursor teammate’s edits reach the room live, so the Claude Code agents around them are told before they edit the same file. Cursor’s own agent is warned too, the one way Cursor lets a hook do it: its first edit of a file a teammate is in is refused, with the reason, and its next try goes through.

what’s live

what isn’t

the warning is a refusal, not a note beside the edit: the agent meets it as an edit that failed with a reason, and tries again knowing it. it comes once per conversation and file every ten minutes, so another edit of that file in that time goes through unpaused. and a shell command the agent runs names no file, so it is never paused.

everyone else, through git

a git post-commit hook, installed once per checkout, reports what landed in each commit: the files, the commit subject and the line counts. it shows where someone landed, not what they’re doing, and it never warns before an edit. aider commits every change by default, so the git client sees aider users close to when they edit. for vim, Emacs or any other editor, it’s commit time only.

every tool, as of the last check

toolwhat it gives a hookadapter
Claude CodePostToolUse: the path, the prompt, the session, before and afterbuilt
CursorafterFileEdit: the path and the edits, as fields; preToolUse beforebuilt
Devin (formerly Windsurf)Claude Code’s own hooks, which it runsbuilt
Codex CLIPreToolUse and PostToolUse, with the path read out of the patchbuilt
GitHub CopilotPreToolUse and PostToolUse, in VS Code and its CLIbuilt
Ampa plugin of ours: the files Amp names for a call; the advisory as a refused first editbuilt
AntigravityPostToolUse after an edit, and a heads-up at the start of each turn; connected when asked forbuilt
Clinehook files before and after a tool; the advisory arrives just after the editbuilt
CrushPreToolUse only: the advisory as a refused first edit, the edit reported once its file changesbuilt
Factory DroidPreToolUse and PostToolUse: the path, or the patch; the advisory as a refused first editbuilt
Gemini CLIBeforeTool and AfterTool: the path; the advisory as a refused first editbuilt
goosea decision before a tool, AfterFileEdit after one; the advisory as a refused first editbuilt
JuniePreToolUse only: the advisory before the edit, to be verified; the edit reported a step laterbuilt
Kilo Codea plugin of ours: the path, or the patch; the advisory as a refused first editbuilt
KiroPreToolUse and PostToolUse: the advisory as a refused first edit, by exit 2built
OpenCodea plugin of ours: the path, or the patch; the advisory as a refused first editbuilt
OpenHandsPreToolUse and PostToolUse, and a plugin for Agent Canvas; the advisory as a refused first editbuilt
Qwen CodePreToolUse and PostToolUse: the advisory as a refused first edit, after the edit is approvedbuilt
Continueno hooks: the MCP tools onlybuilt
Zedno hooks: the MCP tools onlybuilt
Aiderno hook, but it commits every change by defaultthe git client covers it
vim, Emacs, any editornothingcommit time only, through the git client

read from each tool’s own documentation on , and the tools from Amp to Zed on , from their documentation and, where it is open, their source. how each coding agent was checked, as of : the warning before an edit and the reports were tested live in Claude Code, Codex, Cursor, GitHub Copilot (its CLI), Kilo Code and OpenCode, and the MCP tools in Claude Code and Codex; Amp, Cline, Crush, Factory Droid, Gemini CLI, goose, Kiro, OpenHands and Qwen Code are held by our tests against payloads recorded from each tool, not run live yet; Devin, Antigravity, Junie, Continue and Zed rest on their own docs (Devin and Junie partly on our tests too), not tested live yet.

set it up

each developer runs npx agentmash login once. it finds Cursor and adds agentmash’s hooks to ~/.cursor/hooks.json and its MCP server to ~/.cursor/mcp.json, in the home directory and never in a repository, so nothing is committed. then restart Cursor. the repository itself is connected once, by someone who can push to it, at agentmash.dev/install.

step by step, with a prompt to paste into cursor: setting up cursor.

the cursor adapter →every tool, with sources →write your own →