Docs · Using BetterC0de

Multi-agent workflows

Run Claude Code, Codex, Cursor Agent and Grok side by side on one repository without them overwriting each other — conversations, worktrees and review habits that work.

The reason BetterC0de exists: one repository, several coding agents, and a workspace that keeps you in control of what lands. Here is how to run more than one agent without chaos.

Pick the right isolation level

You want to… Use
Ask a second opinion, compare answers, explore Separate conversations, same working tree
Have two agents change code at the same time Separate worktrees (one branch each)
Let one agent review what another wrote Same worktree, sequential — finish, review the diff, then hand off

A conversation is a context boundary, not a file boundary. Two agents editing the same files in the same worktree will race each other. Worktrees give each agent its own checkout so they can work in parallel and you merge on your terms.

A pattern that works

  1. Plan with one agent. Ask Claude Code (or whichever you prefer) to explain the codebase and propose a plan. Tell it to wait before editing.
  2. Split the work. Create a worktree per independent task. Start a conversation in each with a different provider if you like — Codex for tests, Cursor Agent for the UI, Grok for a research spike.
  3. Watch permissions. Every tool call that touches the file system or shell shows up as a permission request. Approve per call or per session, per agent.
  4. Review in the Diff view. Read each worktree's diff before merging. Ask a different agent to review it if you want a second pair of eyes.
  5. Merge and commit from the Git view.

Keeping context clean

  • Start a new conversation when the topic changes; long mixed threads make every agent worse.
  • Give agents the outcome and the constraints, not step-by-step instructions.
  • Keep the preview open for UI work so you can verify instead of trusting.

Things agents share

All agents in a project see the same files on disk. They do not share conversation history with each other — if you want agent B to know what agent A decided, paste the summary or point it at the diff.