timwuhaotian/the-pair

Open-source AI pair programming for desktop: a Mentor + Executor agent cross-check each other's code to catch AI hallucinations. Works with Claude Code, Codex, Gemini & opencode. macOS / Windows / Linux.

What it solves

The Pair addresses the issue of AI code hallucinations where a single AI assistant may overlook its own mistakes. It provides a system where two independent AI agents cross-check each other's work, ensuring that code is reviewed and validated before it is integrated into a codebase.

How it works

The application orchestrates two distinct AI roles:

  • Mentor Agent: A read-only agent that handles planning, reviewing, and validation.
  • Executor Agent: An agent that writes the actual code and executes commands.

Users can mix and match different AI providers (such as Claude Code, OpenAI Codex, Gemini, and local models via Ollama) for these roles. The agents work through a cycle of mentoring, executing, and reviewing. To prevent unbounded execution, the system uses an iteration budget (defaulting to 20 turns) and pauses for human oversight when the budget is reached.

Who it’s for

It is designed for developers who want an automated, multi-agent coding assistant that offers more transparency and validation than single-agent tools like Cursor or Copilot.

Highlights

  • Dual-Model Cross-Validation: Uses two separate models to reduce errors and hallucinations.
  • Multi-Provider Support: Compatible with various CLIs including opencode, Claude Code, Codex, Gemini, and Kimi Code.
  • Unified Pair Console: A single feed that merges conversations, timelines, and terminal events.
  • Real-Time Monitoring: Tracks CPU/memory usage per agent and detects stalled activity.
  • Git Integration: Automatically tracks file changes with an inline diff viewer.
  • Session Recovery: Allows users to resume interrupted sessions with full state restoration.

Related

  • Project
  • Project
  • Project
  • Project
  • Project