Codeman logocodeman GitHub →

Run Claude Code, Codex, Gemini CLI and other agents side by side

Updated 2026-09-25

On this pageOne worktree per agentOne instruction file for every CLIRun them in tmuxWhere the CLIs differHow Codeman handles it

Give each agent its own git worktree, keep the project instructions in one AGENTS.md that every CLI reads, and run each CLI in its own tmux window or pane. The CLIs then differ only in how they log in, where they keep state and how they tell you they are waiting, and those differences are what trip up side-by-side setups.

One worktree per agent

Two agents editing the same checkout will overwrite each other's work. A git worktree gives each one its own checkout on its own branch, sharing the same repository:

cd ~/src/myapp
git worktree add ~/src/myapp-claude -b try/claude
git worktree add ~/src/myapp-codex  -b try/codex
git worktree add ~/src/myapp-gemini -b try/gemini

When they finish, compare the approaches with ordinary git (git diff try/claude try/codex) and remove the worktrees you do not keep with git worktree remove.

One instruction file for every CLI

Each CLI has its own default file for project instructions, but all three can share one AGENTS.md:

CLI Reads by default To share AGENTS.md
Claude Code CLAUDE.md; reads AGENTS.md when there is no CLAUDE.md (v2.1.277 and later) Put @AGENTS.md at the top of CLAUDE.md
Codex AGENTS.override.md and AGENTS.md, from ~/.codex and from the Git root down to the working directory Nothing to do
Gemini CLI GEMINI.md Set "context": { "fileName": ["AGENTS.md", "GEMINI.md"] } in its settings.json

Sources: Anthropic's memory docs, OpenAI's AGENTS.md guide and Gemini CLI's GEMINI.md docs. With the Claude Code import, anything Claude-specific goes below the @AGENTS.md line.

Run them in tmux

One window per agent, each started in its own worktree:

tmux new-session -d -s trio -n claude -c ~/src/myapp-claude claude
tmux new-window     -t trio -n codex  -c ~/src/myapp-codex  codex
tmux new-window     -t trio -n gemini -c ~/src/myapp-gemini gemini
tmux attach -t trio

Ctrl-b n and Ctrl-b p move between them. For a literal side-by-side view, split a window instead: tmux split-window -h -c ~/src/myapp-codex codex puts Codex in a pane beside the current one. Detach with Ctrl-b d and all three keep running.

Where the CLIs differ

Logins and state. Every CLI authenticates on its own and keeps its state in its own place: Claude Code in ~/.claude and ~/.claude.json, Codex in ~/.codex (or $CODEX_HOME), and Gemini CLI and Google's Antigravity (agy) under ~/.gemini. Log each one in once, by hand, before scripting anything. According to Codeman's docs, Gemini CLI has been enterprise-only since Google's June 2026 consumer cutover, with Antigravity as the consumer successor.

Permission modes. There is no common flag. Claude Code uses --dangerously-skip-permissions and refuses it when running as root. Grok Build's equivalent is --always-approve. Pi has no permission prompts at all. DeepSeek Harness takes its permission mode from the DSH_PERMISSION_MODE environment variable, and OMP keeps its approval mode in its own config. Read each CLI's docs before running it unattended.

Knowing when each one is waiting. Claude Code exposes hooks (Notification, Stop and others) that can alert you when it finishes or needs input; see Get notified when Claude Code finishes. Other CLIs have their own mechanisms or none, so a mixed setup usually ends up with one alert path per CLI, or with watching the screens.

Instruction and config files. Covered above. The practical rule: shared facts about the project go in AGENTS.md, CLI-specific behaviour goes in that CLI's own file.

How Codeman handles it

Codeman runs nine agent CLIs plus a plain shell as run modes: Claude Code, OpenCode, Codex, Gemini CLI, Antigravity, Pi, Grok Build, DeepSeek Harness and OMP. Each session runs one CLI in its own tmux session and appears as a tab in a browser dashboard.

Codeman does not create worktrees. Create them with git as above and add each one with Add Case → Link Existing. Any run mode also works inside a per-project container; see Docker Cases.