Loop CLI Orchestrates Claude Code and Codex for Hands-Off Agent Teams
Open SourceScore: 92

Loop CLI Orchestrates Claude Code and Codex for Hands-Off Agent Teams

A new Bun CLI called Loop runs Claude Code and Codex in a persistent paired session, letting them collaborate on tasks and create draft PRs without constant supervision.

Ggentic.news Editorial·3h ago·3 min read·3 views
Share:
Source: github.comvia hn_claude_codeCorroborated

Loop CLI Orchestrates Claude Code and Codex for Hands-Off Agent Teams

A new open-source tool called loop is changing how developers use Claude Code for complex, multi-step tasks. Instead of manually prompting Claude Code for each step, Loop runs Claude Code and Codex in a persistent, orchestrated loop where one agent works and the other reviews.

What Loop Does

Loop is a dead-simple Bun CLI that creates a persistent tmux session with Claude Code and Codex running side-by-side. The agents communicate through the Codex App Server and Claude Code Channels, working together on a shared PLAN.md file. They iterate until both agree the task is complete, then the main worker creates a draft pull request automatically.

This creates a "meta agent loop" where coding agents become long-running collaborators. As the README states: "Stop baby sitting your agents: let them iterate on tasks with clear proof requirements until they are done."

How To Use It

Installation is straightforward:

curl -fsSL https://raw.githubusercontent.com/axeldelafosse/loop/main/install.sh | bash

This installs loop, claude-loop, and codex-loop to ~/.local/bin on macOS and Linux.

Basic usage:

# Start a task with specific requirements
loop --prompt "Implement user authentication" --proof "Write unit tests for all endpoints"

# Start paired interactive tmux workspace
loop

# Open dashboard of running instances
loop dashboard

Loop runs in paired mode by default: one agent does the work while the other stays available for review and support. It keeps both Claude Code and Codex sessions persistent across iterations and bridges messages between them.

Critical Safety Warning

The Loop documentation includes an important warning in all caps: "you SHOULD run this inside a VM. It is NOT safe to run this on your host machine. The agents are running in YOLO mode!"

The recommended setup:

  1. Use Docker or Lume to create a sandbox VM
  2. Install nvm, node, npm, and bun
  3. Install Codex and Claude with their respective CLI tools
  4. Enable Claude's "Agent teams" and Codex's "Multi-agents" experimental features
  5. Install git and GitHub CLI
  6. Create a GitHub fine-grained personal access token
  7. Take a snapshot of your "golden image" for quick restoration

Why This Matters for Claude Code Users

This approach addresses a key limitation mentioned in our recent coverage: Claude Code agents average 25 navigation actions per code edit. By creating persistent sessions and enabling agent-to-agent communication, Loop reduces the need for constant human intervention during complex coding tasks.

The tool leverages existing agent harnesses rather than reinventing them. As the documentation notes: "The models are getting better very quickly and they are highly optimized for their respective harnesses."

Getting Started Safely

Before running Loop, ensure you have:

  • Claude Code and Codex installed and logged in
  • tmux for side-by-side TUIs
  • Bun for building from source (prebuilt binaries don't require Bun)

For Playwright testing support:

bun x playwright install chromium

Loop stores paired run state under ~/.loop/runs/... so runs can be resumed by run ID or session/thread ID, making it suitable for long-running development tasks.

AI Analysis

Loop represents a significant shift in how Claude Code can be used for production work. Instead of treating Claude Code as a single-turn assistant, developers should now consider setting up persistent agent teams for complex features. **Immediate Action Items:** 1. **Set up a sandbox VM immediately** before experimenting with Loop. The YOLO mode warning is serious—this follows our March 25th coverage of Claude Code's deny list bypass vulnerability where dangerous actions could slip through. 2. **Enable experimental features** in both Claude Code and Codex. Loop requires Claude's "Agent teams" and Codex's "Multi-agents" features to be turned on in your account settings. 3. **Start with small proof requirements**. Use the `--proof` flag to define concrete success criteria like "Write unit tests" or "Pass linting checks" rather than vague completion criteria. **Workflow Change:** For features that would normally require multiple back-and-forths with Claude Code, consider using `loop --prompt "Implement {feature}" --proof "{verification method}"` and letting the agents work while you focus on other tasks. Monitor progress via `loop dashboard` rather than watching the tmux session directly.
Enjoyed this article?
Share:

Related Articles

More in Open Source

View all