How to Set Up Munder Difflin with Different AI Coding Agents: A Complete Guide
Set up Munder Difflin with Claude, Copilot, Codex, or any supported AI coding agent by verifying CLI binaries, using the visual provider picker, and optionally configuring Git-isolated worktrees and shareable hire manifests.
Munder Difflin is a local, open-source harness that transforms terminal-based AI coding CLIs into a self-coordinating "office floor" of agents. Whether you're running Claude Code, GitHub Copilot CLI, OpenAI Codex, or any of the dozen-plus supported engines, the setup follows a consistent three-layer pattern defined in the chaitanyagiri/munder-difflin source code.
Prerequisites: Install Agent CLIs
Before adding agents, ensure the underlying engine binaries are available on your system. Munder Difflin checks for each CLI on launch and references the Prerequisites table in README.md to determine platform-specific installation commands.
If a binary is missing, the harness automatically executes the correct installer. For example, GitHub Copilot CLI is installed via:
npm install -g @github/copilot
Verify availability before launching the app:
# Check individual engines
claude --version
copilot --version
codex --version
grok --version
Automatic restart occurs after successful installation, so you can proceed directly to agent configuration.
Adding an Agent: Provider Selection and Configuration
Step 1: Open the Visual Provider Picker
Click Add Agent on the office floor. The visual picker lists every supported engine—Claude Code, Antigravity, Codex, Grok, Kimi, Gemini CLI, Qwen, OpenCode, Crush, pi.dev, GitHub Copilot CLI, Cursor, and others.
Step 2: Configure the Hire
For each agent, you define:
- Name — a human-readable identifier for the worker
- Working directory — the project root the agent operates within
- Git isolation — optional toggle that creates a dedicated worktree for sandboxed execution
The Git isolation feature, as detailed in blog/src/posts/how-to-add-a-github-copilot-cli-agent.md, prevents agents from interfering with each other's branches or uncommitted changes.
Step 3: Select the Model
Engines supporting multiple models trigger a model picker. GitHub Copilot CLI, for instance, offers:
claude-sonnet-4.5gpt-5.4auto(provider-selected)
Model selection persists in the agent's runtime configuration and can be adjusted per hire.
Runtime Controls: Auto-Mode, Validation, and Environment Metadata
Auto-Mode and Command Flags
The Auto-mode toggle gates engine-specific approval flags. When enabled for Copilot, the harness appends -s --allow-all-tools --no-ask-user to the spawn command. This behavior is defined in the agent configuration logic referenced in the Copilot setup guide.
Command Name Validation
Before resolving against $PATH, the command name undergoes validation to prevent injection attacks. This security check is documented in the README.md Security section and implemented in src/main/pty.ts, which manages the PTY processes running each CLI agent.
Per-Agent Environment Access
Runtime metadata—cwd, validity state, provider, session ID, status—is exposed via tools/agent-env.cjs. Query any running agent:
node tools/agent-env.cjs <agent-id> --json
Respawn a peer worker in the same directory:
node tools/agent-env.cjs <peer-id> | grep cwd
The AGENT-ENV.md specification defines the full JSON schema and CLI interface.
Advanced: Shareable Hire Manifests
For reproducible agent configurations, create a hire manifest (JSON) capturing all runtime parameters:
{
"name": "Copilot-Worker-A",
"avatar": "michael",
"provider": "copilot",
"model": "claude-sonnet-4.5",
"commandFlags": ["--model", "claude-sonnet-4.5"],
"goal": "Fix lint errors across the repo",
"capabilityTags": ["code-fix"],
"budgetTokens": 5000
}
Import manifests via:
- Pasting JSON into the Add Agent modal
- Clicking a
munderdiffl.in://hire?...deep link to pre-fill the form
This approach is documented in blog/src/posts/shareable-agent-roles.md and enables team-wide agent standardization.
Core Implementation Files
| File | Purpose |
|---|---|
README.md |
Prerequisites, install commands, security overview |
tools/agent-env.cjs |
CLI for per-agent environment metadata |
tools/AGENT-ENV.md |
Specification for environment JSON schema |
HIVE.md |
Multi-agent architecture: mailboxes, memory, blackboard |
SPEC.md |
Terminal/event plane specification for agent spawning |
DESIGN.md |
Visual design language and token system |
src/main/hive.ts |
CWD validation (cwdValid) and agent metadata persistence |
src/main/pty.ts |
PTY process management for CLI agents |
src/preload/index.ts |
Typed bridge (window.cth) for filesystem, git, and agent helpers |
Summary
- Verify CLIs on
$PATHfirst; Munder Difflin auto-installs missing engines on first use - Add agents through the visual picker, with optional Git-isolated worktrees for sandboxing
- Configure models per-engine where multiple options exist
- Enable Auto-mode to gate approval flags, with validated command names for security
- Inspect runtime state via
tools/agent-env.cjsand respawn peers in identical environments - Use hire manifests for reusable, shareable agent configurations importable via deep links
Frequently Asked Questions
Does Munder Difflin work with Claude Code and GitHub Copilot CLI simultaneously?
Yes. The office floor design specifically supports heterogeneous agent fleets. Each agent runs in its own PTY process with isolated memory and mailbox, coordinated by the GOD orchestrator. You can add Claude Code, Copilot CLI, Codex, and others side-by-side without conflict.
What happens if an AI coding agent CLI isn't installed?
The harness detects missing binaries during the Add Agent flow and executes the platform-appropriate installer automatically. For Copilot, this runs npm install -g @github/copilot. The spawn restarts once installation completes, requiring no manual intervention.
How do I run two agents in the same project directory without Git conflicts?
Enable Git isolation when adding the agent. This creates a dedicated Git worktree for that worker, giving it an independent working tree and index while sharing the same repository history. The feature is implemented in src/main/hive.ts and prevents cross-agent interference with uncommitted changes.
Can I export and reuse agent configurations across machines?
Yes. Export a hire manifest as JSON containing provider, model, flags, goal, capability tags, and token budget. Import via paste into the Add Agent modal or via munderdiffl.in://hire? deep links. This workflow is specified in blog/src/posts/shareable-agent-roles.md.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →