iterm-mcp-claude-agency: Agent for Claude Code

.github/agents/iterm2-orchestration.agent.md

iterm2-orchestration is an agent for Claude Code from research-developer/iterm-mcp-claude-agency. It costs 70 tokens per session (5,014 once invoked), scanned A, original, MIT.

A reference for using iTerm2, a macOS terminal app, to run multiple Claude Code agents asynchronously. It shows how to create windows, tabs, and split terminal panes, then send commands to them.

In plain words
What is it for?
Building multi-agent terminal layouts, starting agent processes, splitting panes, and sending commands through iTerm2's Python API.
Why use it?
It helps coordinate several coding agents in organized terminal sessions instead of managing each one manually.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions Claude Code.

This is research-developer/iterm-mcp-claude-agency's own configuration. It tells Claude Code how to work on iterm-mcp-claude-agency itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything iterm-mcp-claude-agency configures →

Reuse

Borrowing it

Nothing to install: this file belongs to research-developer/iterm-mcp-claude-agency. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/research-developer/iterm-mcp-claude-agency/main/.github/agents/iterm2-orchestration.agent.md
Clone the repo
git clone --depth 1 https://github.com/research-developer/iterm-mcp-claude-agency

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for iterm2-orchestration

README.md
[![agentmods](https://agentmods.dev/badge/agents/research-developer/iterm-mcp-claude-agency/iterm2-orchestration/github.svg)](https://agentmods.dev/agents/research-developer/iterm-mcp-claude-agency/iterm2-orchestration)
Your own site
<a href="https://agentmods.dev/agents/research-developer/iterm-mcp-claude-agency/iterm2-orchestration"><img src="https://agentmods.dev/badge/agents/research-developer/iterm-mcp-claude-agency/iterm2-orchestration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for iterm2-orchestration

Your own site · 80×15
<a href="https://agentmods.dev/agents/research-developer/iterm-mcp-claude-agency/iterm2-orchestration"><img src="https://agentmods.dev/badge/agents/research-developer/iterm-mcp-claude-agency/iterm2-orchestration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,014 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.05014
Opus 5 $0.00035 $0.02507
Sonnet 5 $0.00014 $0.01003
Haiku 4.5 $0.00007 $0.00501

Measured 10d ago against content hash d87d04fe52aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

iterm2-orchestration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/iterm2-orchestration.agent.md · 707 lines

How it starts

The opening of the file, as written. The whole thing — 707 lines — stays where its author put it; the contents beside it link to each section on GitHub.

iTerm2 Python API for Multi-Agent Orchestration

Complete reference for building Claude Code multi-agent orchestration using iTerm2's async Python API.

Quick Reference

import iterm2

async def main(connection):
    app = await iterm2.async_get_app(connection)
    window = app.current_terminal_window
    session = window.current_tab.current_session
    
    # Split panes
    right = await session.async_split_pane(vertical=True)
    bottom = await session.async_split_pane(vertical=False)
    
    # Send commands
    await session.async_send_text("claude-code --agent worker-1\n")

iterm2.run_forever(main)

Core Hierarchy: App → Window → Tab → Session

app = await iterm2.async_get_app(connection)
windows = app.terminal_windows           # All windows
window = app.current_terminal_window     # Active window
tab = window.current_tab
session = tab.current_session            # Active pane (session = pane)

Creating Windows and Tabs

window = await iterm2.Window.async_create(connection, profile="AgentWorker")
tab = await window.async_create_tab(profile="Default", index=0)

Splitting Panes (tmux-style)

right_pane = await session.async_split_pane(vertical=True)   # Side-by-side
bottom_pane = await session.async_split_pane(vertical=False) # Stacked

# 2x2 grid (3 splits from original)
top_left = tab.current_session
top_right = await top_left.async_split_pane(vertical=True)
bottom_left = await top_left.async_split_pane(vertical=False)
bottom_right = await top_right.async_split_pane(vertical=False)

Session Lookup and Tab Movement

session = app.get_session_by_id(session_id)
new_window = await tab.async_move_to_window()
await window.async_set_tabs([tabs[2], tabs[0], tabs[1]])  # Reorder

Arrangements (Save/Restore Layouts)

await iterm2.Arrangement.async_save(connection, "agent-workspace")
await iterm2.Arrangement.async_restore(connection, "agent-workspace")

Event Monitors (12 Types)

Read the full file on GitHub · 707 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 707 lines · 70 tokens per session scan A d87d04fe52aa

Subscribe to this mod's changes

iterm2-orchestration is an agent published in the GitHub repository research-developer/iterm-mcp-claude-agency (4 stars, last pushed 2mo ago), licensed MIT. It adds 70 tokens to every session and 5,014 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.