Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:777genius Agent teams ai CLI Runtimes

From Leeroopedia
Knowledge Sources
Domains Infrastructure, AI_Agents
Last Updated 2026-10-22 00:00 GMT

Overview

External AI CLI runtimes (Claude, Codex, OpenCode, Gemini) detected, installed, and orchestrated by the agent-teams desktop app for team provisioning and model availability.

Description

The app supports multiple AI provider CLIs as runtime backends. `CliInstallerService.getStatus()` probes each provider's installation status, authentication, and model availability. Providers include Anthropic (Claude), Codex, Gemini, and OpenCode. Each provider has platform-specific binary paths, authentication requirements, and model catalog endpoints. The app auto-detects installed CLIs and provides zero-setup onboarding. Provider status is cached with a 5-second TTL (`STATUS_CACHE_TTL_MS`) and deduplicated for concurrent requests via in-flight promise sharing.

Usage

Use this environment for implementations that detect, probe, or launch AI CLI runtimes: team provisioning, CLI status detection, provider authentication authority, model catalog availability, and local provider discovery.

System Requirements

Category Requirement Notes
OS macOS, Windows, or Linux Platform-specific binary paths and install methods
Provider CLIs Claude CLI, Codex CLI, OpenCode, or Gemini CLI At least one must be installed and authenticated
Auth Provider-specific credentials API keys, OAuth tokens, or config files per provider

Dependencies

CLI Binaries

  • `claude` (Anthropic Claude CLI) — installed via npm or native installer
  • `codex` (OpenAI Codex CLI) — installed via npm
  • `opencode` (OpenCode runtime) — staged via `stage-opencode-console-wrapper.mjs`
  • `gemini` (Google Gemini CLI) — installed via npm

Node.js Packages

  • No additional packages — these CLIs are external runtime dependencies

Credentials

The following credentials are required per provider (names only):

  • `ANTHROPIC_API_KEY` — Claude API access (or OAuth via `claude` CLI login)
  • `OPENAI_API_KEY` — Codex API access
  • `GEMINI_API_KEY` — Gemini API access
  • OpenCode: provider-specific config in `~/.config/opencode/` or equivalent

Quick Install

# Claude CLI
npm install -g @anthropic-ai/claude-code

# Codex CLI
npm install -g @openai/codex

# The app auto-detects installed CLIs on startup
# Run pnpm dev to launch the desktop app
pnpm dev

Code Evidence

Provider ID set from `cliInstaller.ts:64`:

const CLI_PROVIDER_IDS = new Set<unknown>(['anthropic', 'codex', 'gemini', 'opencode']);

Status cache TTL from `cliInstaller.ts:61`:

const STATUS_CACHE_TTL_MS = 5_000;

In-flight deduplication from `cliInstaller.ts:445-447`:

const inFlight = providerStatusInFlight.get(requestKey);
if (inFlight) {
  const status = await inFlight;

Platform-specific binary paths from `cliInstaller.ts:26-33`:

| 'darwin-arm64'
| 'darwin-x64'
| 'linux-x64'
| 'linux-arm64'
| 'linux-arm64-musl'
| 'linux-x64-musl'
| 'win32-x64'
| 'win32-arm64';

Common Errors

Error Message Cause Solution
CLI not detected Binary not in PATH or not installed Run `pnpm team:prove-agent-cli-launch` to verify
Provider status stale Cache TTL not expired Wait 5s or call `cliInstaller:invalidateStatus`
Model catalog empty Provider not authenticated Log in via the provider CLI (e.g., `claude login`)
OpenCode bootstrap unconfirmed Lane bootstrap incomplete Check `opencode-sessions.json` manifest, not just primary filesystem readiness

Compatibility Notes

  • Claude CLI >= 2.1.x: Handles SIGTERM gracefully (deletes team files) — must use SIGKILL for process termination.
  • OpenCode: Secondary lanes do not watch teammate inbox files; user DMs delivered through runtime bridge.
  • Windows: Different binary paths and install methods; model limits may apply (`opencodeWindowsModelLimit`).
  • Parallel probing: Max 3 concurrent provider runtime requests (`MAX_PARALLEL_PROVIDER_RUNTIME_REQUESTS`).

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment