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:0xNyk Council of high intelligence CLI Host

From Leeroopedia
Knowledge Sources
Domains AI, CLI_Integration, Multi_Model_Systems
Last Updated 2026-10-20 00:00 GMT

Overview

A CLI host runtime (Claude Code, Codex CLI, Gemini CLI, or opencode) that provides the coordinator skill execution context, subagent dispatch, and Bash tool access for multi-provider council deliberation.

Description

The CLI Host environment is the runtime context in which the Council of High Intelligence coordinator skill executes. It provides three capabilities the protocol depends on: (1) a skill-loading mechanism that reads `SKILL.md` and agent definitions, (2) a subagent dispatch system for spawning council members as isolated agents, and (3) a Bash tool for invoking external provider CLIs (`codex exec`, `gemini`, `ollama run`, `cursor-agent`) and the `detect-providers.sh` detection script.

The canonical host is Claude Code, which provides native subagent dispatch (`subagent_type`), the `model` parameter for per-agent model overrides, and the Bash tool. Codex CLI, Gemini CLI, and opencode are supported via mirrored protocol files (`SKILL.codex.md`, `SKILL.gemini.md`, `SKILL.opencode.md`) that adapt the dispatch interface to each host's capabilities. The protocol is designed so that any host with a Bash tool and subagent dispatch can run the full council sequence.

Usage

Use this environment for any coordinator execution — running `/council` to convene a panel, dispatch members to providers, run multi-round deliberation, and synthesize a verdict. It is the mandatory prerequisite for the Coordinator_Execution_Sequence, Dispatch_Methods, Auto_Routing_Algorithm, Tie_Breaking, and auto_route_defaults_yaml implementations.

System Requirements

Category Requirement Notes
OS Linux, macOS, or WSL2 Windows native not officially supported
Hardware Any CPU No GPU required; deliberation is API-bound
Disk ~5 MB Skill files + agent definitions + scripts + configs
Runtime CLI host (one of below) Claude Code (canonical), Codex CLI, Gemini CLI, or opencode

Dependencies

CLI Host Runtimes (one required)

  • `claude` (Claude Code) — canonical host, provides native subagent dispatch
  • `codex` (Codex CLI) — OpenAI host, uses `codex exec` for member dispatch
  • `gemini` (Gemini CLI) — Google host, uses `gemini -m` for member dispatch
  • `opencode` (opencode CLI) — uses native subagents with converted frontmatter

External Provider CLIs (optional, for multi-provider routing)

  • `codex` >= latest — for OpenAI seats (`codex exec`)
  • `gemini` >= latest — for Google seats (`gemini -m`)
  • `ollama` >= latest — for local model seats (`ollama run`)
  • `cursor-agent` >= latest — for Cursor aggregator seats (`cursor-agent -p --mode ask`)
  • `curl` + `jq` — for OpenAI-compatible API seats (NVIDIA NIM, vLLM, etc.)

Skill Assets (installed via install.sh)

  • `SKILL.md` (or host mirror) — coordinator protocol
  • `agents/council-*.md` — 18 agent persona definitions
  • `scripts/detect-providers.sh` — provider detection
  • `configs/auto-route-defaults.yaml` — model tier mapping

Credentials

The following environment variables are optional but required for specific provider seats:

  • `ANTHROPIC_API_KEY` — Anthropic API access (implicit in Claude Code host)
  • `OPENAI_API_KEY` — OpenAI API access (used by Codex CLI)
  • `NVIDIA_API_KEY` — NVIDIA NIM endpoint access (must start with `nvapi-`)
  • `CURSOR_API_KEY` — Cursor CLI authentication (alternative to `cursor-agent login`)
  • `GEMINI_API_KEY` — Google Gemini API access (used by Gemini CLI)

Never inline API keys in command strings. The protocol uses process substitution (`-H @<(…)`) for curl-based dispatch so keys never appear in `ps` output.

Quick Install

# Install the council skill into Claude Code (default)
./install.sh

# Install into multiple hosts
./install.sh --codex --gemini

# Install into opencode (converts agent frontmatter)
./install.sh --opencode

# Dry-run to verify without writing
./install.sh --dry-run

Code Evidence

CLI host dependency — the protocol assumes a Bash tool and subagent dispatch. From `SKILL.md:L65-68` (Asset Resolution):

This skill is distributed two ways, so council assets live in one of two roots.
1. install.sh layout: agents at ~/.claude/agents/council-{name}.md,
   scripts at ~/.claude/skills/council/scripts/,
   configs at ~/.claude/skills/council/configs/
2. Plugin layout (marketplace install): agents at ${CLAUDE_PLUGIN_ROOT}/agents/...

Subagent dispatch (Claude Code host) from `SKILL.md:L303-306`:

For `subagent` (Anthropic) — spawn as Claude Code subagent:
- Use `subagent_type` matching the council member's agent name
  (agents are in ~/.claude/agents/)
- Use the `model` parameter from the routing table
  (opus/sonnet/haiku) to override the agent's default if needed

External CLI dispatch via Bash tool from `SKILL.md:L310-318`:

# codex_exec dispatch — runs via Bash tool
codex exec -c model="{model}" -c auto_approve=true "$(cat "$PROMPT_FILE")" 2>/dev/null

# gemini_cli dispatch — runs via Bash tool
gemini -m {model} -p "$(cat "$PROMPT_FILE")" 2>/dev/null

# ollama_run dispatch — runs via Bash tool
ollama run {model} "$(cat "$PROMPT_FILE")" 2>/dev/null

Provider detection via Bash from `SKILL.md:L226`:

Run the detection script via Bash:
  bash ~/.claude/skills/council/scripts/detect-providers.sh

Common Errors

Error Message Cause Solution
`SKILL.md not found at …/SKILL.md` Skill not installed or wrong working directory Run `./install.sh` or verify `~/.claude/skills/council/SKILL.md` exists
`no council agent files found` `agents/` directory missing or empty Clone the repo fully; `agents/council-*.md` files are required
`command not found: codex` / `gemini` / `ollama` External provider CLI not installed Install the CLI or use `--no-auto-route` for Claude-only mode
`[FALLBACK] {member} failed on {provider}` External provider call timed out or returned empty stdout Check provider CLI auth, network; coordinator auto-falls back to anthropic subagent
`NVIDIA_API_KEY` unset or not `nvapi-` prefixed NIM detection skips the provider Set `export NVIDIA_API_KEY="nvapi-…"` with a valid key

Compatibility Notes

  • Claude Code: Canonical host — full protocol support including native subagent dispatch, `model` overrides, and Bash tool.
  • Codex CLI: Uses `SKILL.codex.md` mirror; dispatches members via `codex exec`. Protocol features are content-parity checked by `council-simulation-checklist.sh`.
  • Gemini CLI: Uses `SKILL.gemini.md` mirror; dispatches via `gemini -m`. Content-parity checked — this file had a feature drift regression before the checklist was extended.
  • opencode: Uses `SKILL.opencode.md` mirror; agent frontmatter is converted by `scripts/convert-agents-opencode.py`. Currently lint/existence-guarded only — lacks E3 (reasoning_method), E9 (confidence factors), E7 (.council.yaml overrides), and Asset Resolution. Tracked in the opencode drift issue.
  • Windows: Not officially supported; use WSL2 for the Bash tool and external CLIs.
  • Single-provider (Claude-only): Fully supported — if `detect-providers.sh` reports `provider_count == 1`, routing is skipped and agent frontmatter defaults are used.

Related Pages

Page Connections

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