Skip to main content

Three providers, one workflow

Claude Octopus orchestrates Codex (OpenAI), Gemini (Google), and Claude (Anthropic) across every workflow. Each provider has a distinct role designed to leverage its unique strengths.
You don’t need all three providers. One external provider plus Claude gives you multi-AI features. No external providers still gives you 33 personas, workflows, and skills.

Provider roles

Each provider is assigned a specific role based on its strengths:

Codex

Implementation depth
  • Code generation
  • Technical analysis
  • Architecture patterns
  • API design
  • Algorithm optimization

Gemini

Ecosystem breadth
  • Research synthesis
  • Alternative approaches
  • Security review
  • Best practices
  • Community patterns

Claude

Orchestration & synthesis
  • Quality gates
  • Consensus building
  • Strategic synthesis
  • Moderation
  • Final recommendations

Why these roles?

Role assignment is based on empirical testing and provider characteristics:
ProviderUnderlying ModelKey StrengthRole Assignment
CodexGPT-5.3-CodexCode generation, structured outputImplementation details
GeminiGemini 3.0 ProResearch synthesis, broad knowledgeEcosystem analysis
ClaudeSonnet 4.6 / Opus 4.6Nuanced reasoning, code reviewSynthesis & moderation

Role assignment by workflow

Different workflows emphasize different provider strengths:

Discover phase role assignment

Execution: Parallel (fastest)
ProviderTaskWhy This Provider?
🔴 CodexTechnical implementation analysisDeep code pattern knowledge
🟡 GeminiEcosystem and community researchBroad web knowledge
🔵 ClaudeStrategic synthesisBest at combining perspectives
Example:
# Both run simultaneously
codex exec "analyze OAuth 2.0 implementation patterns" &
gemini -p "" "research OAuth 2.0 ecosystem and best practices" &
wait

# Claude synthesizes
claude --print "synthesize findings from both perspectives"

Consensus gates

Consensus gates enforce agreement thresholds before work advances.

How consensus is measured

Scoring methodology

Consensus score is based on:
  1. Subtask success rate - What percentage of subtasks succeeded?
  2. Agreement score - How similar are the provider outputs?
  3. Conflict detection - Are there direct contradictions?
Formula:
Consensus Score = (success_rate * 0.5) + (agreement * 0.3) + (1 - conflicts * 0.2)

Threshold configuration

Default threshold: 75% Override via environment variable:
# Stricter (85% required)
export CLAUDE_OCTOPUS_QUALITY_THRESHOLD=85

# More lenient (60% required)
export CLAUDE_OCTOPUS_QUALITY_THRESHOLD=60
Lowering below 75% reduces confidence in multi-AI consensus. Use cautiously.

What happens at gate failure?

1

Identify disagreements

Parse which subtasks failed and where providers disagree
2

Analyze root cause

Determine if disagreement is fundamental or resolvable
3

Revision attempt

Retry with refined prompt or additional context (max 3 attempts)
4

Human escalation

Present findings and ask user to break tie or adjust approach

Cost transparency

Claude Octopus shows exactly which providers are running and what it costs.

Visual indicators

Before every multi-AI workflow, you see:
🐙 CLAUDE OCTOPUS ACTIVATED - Multi-provider research mode
🔍 Discover Phase: Researching authentication patterns

Providers:
🔴 Codex CLI - Technical implementation analysis
🟡 Gemini CLI - Ecosystem and community research
🔵 Claude - Strategic synthesis

💰 Estimated Cost: $0.02-0.05
⏱️  Estimated Time: 30-60 seconds

Provider cost breakdown

ProviderCost SourceEstimated Per Query
🔴 CodexYour OPENAI_API_KEY$0.01-0.15 (depends on model)
🟡 GeminiYour GEMINI_API_KEY$0.01-0.03
🔵 ClaudeIncluded in Claude Code subscription$0 (included)
Model costs (as of Feb 2026):
ModelInputOutputUse Case
gpt-5.3-codex$1.75/MTok$14/MTokPremium (default)
gpt-5.3-codex-spark$1.75/MTok$14/MTokUltra-fast (1000+ tok/s)
gpt-5.2-codex$1.00/MTok$8/MTokStandard
gpt-5.1-codex-mini$0.30/MTok$1.25/MTokBudget

Cost controls

# Abort if estimated cost exceeds $0.50
export OCTOPUS_MAX_COST_USD=0.50
Workflows check estimated cost before execution and abort if over limit.
Provider router automatically selects cheapest capable provider:
  • Analyzes task requirements
  • Matches to provider capabilities
  • Selects cheapest option that can handle it
  • Falls back if first choice unavailable
Install only one external provider:
  • Codex only: Dual perspective (Codex + Claude)
  • Gemini only: Dual perspective (Gemini + Claude)
  • Neither: Claude-only mode (personas and workflows still work)

Provider authentication

Claude Octopus supports two authentication methods:

Provider detection

Claude Octopus auto-detects available providers:
# Check provider status
/octo:setup

# Output:
# Providers:
#   🔴 Codex CLI: ready (OAuth authenticated)
#   🟡 Gemini CLI: ready (GEMINI_API_KEY found)
#   🔵 Claude: ready (built-in)

Graceful degradation

Available ProvidersBehavior
Codex + Gemini + ClaudeFull three-way orchestration
Codex + ClaudeDual perspective (Codex + Claude)
Gemini + ClaudeDual perspective (Gemini + Claude)
Claude onlySingle-provider mode (personas still work)
Workflows automatically adapt based on what’s available.

Security considerations

Environment isolation (v8.7.0+)

External providers run with minimal environment:
# Only essential variables passed
env -i PATH="$PATH" HOME="$HOME" \
  OPENAI_API_KEY="$key" TMPDIR="/tmp" \
  codex exec "prompt"
Prevents:
  • API key leakage to external providers
  • Access to sensitive environment variables
  • Unintended environment pollution

Trust markers

Provider outputs are wrapped with trust indicators:
<external-cli-output provider="codex" trust="untrusted">
  [Codex output here]
</external-cli-output>

<external-cli-output provider="gemini" trust="untrusted">
  [Gemini output here]  
</external-cli-output>
Claude outputs pass through unchanged (trusted by default).

Data flow

Best practices

Don’t second-guess role assignment. Codex for implementation, Gemini for ecosystem, Claude for synthesis—each provider does what it does best.
If providers disagree significantly (less than 75% consensus), investigate why. Forcing through disagreements undermines multi-AI value.
Set OCTOPUS_MAX_COST_USD on shared accounts or CI/CD to prevent runaway costs.
Use OAuth authentication instead of API keys—it’s included in subscriptions and requires no key management.

Next steps

Double Diamond

Learn about the four-phase workflow structure

Workflows

Explore workflow patterns and autonomy modes

Provider setup

Configure Codex and Gemini authentication

Cost optimization

Learn to minimize multi-AI costs

Build docs developers (and LLMs) love