Feb 19, 2026 · Comparative Analysis

AI Coding Agents
8 Tools Compared

A deep technical comparison across architecture, capabilities, security, hooks, memory, extensibility, and telemetry for every major AI coding agent.

Claude Code
Codex
Factory
Amp
Gemini CLI
Pi (TS)
Pi (Rust)
OpenCode
01 — Architecture

Runtime & Binary

Four runtime families: Bun standalone, Rust native, Node.js interpreted, and Codex's hybrid Rust+Electron.

Claude Code
TypeScript
Bun (JSC)
184 MB · TUI
Public · Custom lic
Codex
Rust
Native + Electron
74 MB · TUI+GUI
Public · Apache-2.0
Factory
TypeScript
Bun (JSC)
96 MB · TUI
Closed · Proprietary
Amp
TypeScript
Bun (JSC)
82 MB · TUI
Public · Apache-2.0
Gemini CLI
TypeScript
Node.js
18 MB (npm) · TUI
Public · Apache-2.0
Pi (TS)
TypeScript
Node/Bun
npm pkg · TUI
Public · MIT
Pi (Rust)
Rust
Native
~8-15 MB · TUI
Public · MIT
OpenCode
TypeScript
Bun
npm/brew · TUI+Tauri
Public · MIT

Binary Size

Pi (Rust)
~12 MB
Gemini CLI
18 MB
Codex
74 MB
Amp
82 MB
Factory
96 MB
Claude Code
184 MB

Cold Start Performance

Pi (Rust)
<15ms
Codex
~100ms
Bun tools
~300-500ms
Gemini/Pi TS
~1-2s
02 — Tool Capabilities

Complete Tool Registry

Every tool from all 8 agents, semantically grouped. All share the same core loop, but differ in breadth and depth.

FunctionClaude CodeCodexFactoryAmpGemini CLIPi TSPi RustOpenCode
Run shellBashexec_commandexecute-cliBashToolShellToolbashbashbash
Read fileReadread_filevia shellReadToolReadFileToolreadreadvia shell
Batch read————ReadManyFiles———
Write fileWriteapply_patchApplyPatchWriteToolWriteFileToolwritewritewrite
Edit fileEditapply_patchApplyPatchEditToolEditToolediteditedit
GrepGrepfile_searchvia shellSearchToolGrepToolgrepgrepgrep
Find filesGlobfile_searchvia shellListToolGlobToolfindfindglob
List dirvia Globlist_dirvia shellListToolLSToollslslist
Web searchWebSearchweb_search——WebSearchTool——websearch
Web fetchWebFetch———WebFetchTool———
Ask userAskUserrequest_user_inputpromptpromptAskUserToolctx.uiTUIquestion
Memoryauto MEMORY.mdmemory_tool——MemoryTool———
Sub-agentsTaskspawn_agentorchestratordtw-createagents/*.md———

💡 All tools use ripgrep under the hood for content search. Gemini CLI has both built-in grep and a ripgrep-backed fallback variant.

Dots: CC=Claude Code, Cx=Codex, Fa=Factory, Am=Amp, Gm=Gemini, PT=Pi TS, PR=Pi Rust, OC=OpenCode

Web Search
CC
Cx
Fa
Am
Gm
PT
PR
OC
Web Fetch
CC
Cx
Fa
Am
Gm
PT
PR
OC
Plan Mode
CC
Cx
Fa
Am
Gm
PT
PR
OC
Task Tracking
CC
Cx
Fa
Am
Gm
PT
PR
OC
MCP Client
CC
Cx
Fa
Am
Gm
PT
PR
OC
Sub-Agents
CC
Cx
Fa
Am
Gm
PT
PR
OC
Memory Tool
CC
Cx
Fa
Am
Gm
PT
PR
OC
Hook System
CC
Cx
Fa
Am
Gm
PT
PR
OC
Session Branch
CC
Cx
Fa
Am
Gm
PT
PR
OC
Image Processing
CC
Cx
Fa
Am
Gm
PT
PR
OC
Thinking Levels
CC
Cx
Fa
Am
Gm
PT
PR
OC
JS REPL
CC
Cx
Fa
Am
Gm
PT
PR
OC
SQLite Tool
CC
Cx
Fa
Am
Gm
PT
PR
OC
Notebook Edit
CC
Cx
Fa
Am
Gm
PT
PR
OC
Git Commit Tool
CC
Cx
Fa
Am
Gm
PT
PR
OC
Internal Docs
CC
Cx
Fa
Am
Gm
PT
PR
OC
Session Rewind
CC
Cx
Fa
Am
Gm
PT
PR
OC
Env Var Redaction
CC
Cx
Fa
Am
Gm
PT
PR
OC

Named Tools Count

Factory
~5
~5
Amp
~6
~6
Pi (TS)
7
7 + unlimited ext
Pi (Rust)
7
7
OpenCode
~8
~8
Gemini CLI
~19
~19
Codex
~20
~20
Claude Code
24+
24+

Embedded MCP Server

Codex

Other tools call INTO Codex via MCP, not just the reverse

Full Collab Suite

Codex

spawn_agent, send_input, resume_agent, wait, close_agent — complete lifecycle

Cloud Tasks

Codex

Submit tasks to cloud, get diffs back, apply locally

WebSocket API Transport

Codex

Incremental updates without full message re-send

14 Hook Events

Claude Code

Most comprehensive event system: PreToolUse, PostToolUse, PermissionRequest, SubagentStart/Stop, and more

Plugin Marketplace

Claude Code

Hot-reload, auto-update, trust warnings, registry-based

Agent Teams

Claude Code

Multi-agent collaboration with TeammateIdle/TaskCompleted hooks

A2A HTTP Server

Gemini CLI

Linux Foundation standard — expose agent as A2A endpoint

macOS Seatbelt Profiles

Gemini CLI

permissive/strict/restrictive + proxied variants for fine-grained sandbox

Env Var Redaction

Gemini CLI

Pattern-based secret redaction (tokens, keys, certs) with allowlist/blocklist

Tool Discovery Command

Gemini CLI

Shell command → JSON FunctionDeclaration[] → auto-registered tools

Telemetry Off by Default

Gemini CLI

Commercial tool with telemetry defaulting to OFF (opt-in only)

Session Rewind + State Revert

Gemini CLI

/rewind navigates backward AND reverts file state

Batch File Read

Gemini CLI

ReadManyFilesTool reads multiple files in one call

Full Extension API

Pi TS

registerTool(), registerCommand(), events, UI components, themes

Tree-Structured Branching

Pi TS, Pi Rust

Navigate/fork any point in conversation history

75+ Providers

OpenCode

Models.dev registry integration — plug in almost any LLM

Tauri Desktop

OpenCode

Three UIs (TUI + Tauri + server) from one codebase

Distributed Workers

Amp

Fan out work to remote execution threads via dtw-create

LLM Proxy Routing

Factory

Swap providers server-side without client changes

03 — LLM Providers

Provider Support Matrix

From vendor-locked single providers to 75+ via registry integration. Three tools lock to one vendor; the rest offer flexibility.

Supported Provider Count

Codex
1
1
Gemini CLI
1
1 (Google)
Claude Code
3
3
Pi (Rust)
4
4
Amp
~5
~5
Factory
~6
~6 (proxy)
Pi (TS)
15+
15+
OpenCode
75+
75+
ProviderClaude CodeCodexFactoryAmpGemini CLIPi TSPi RustOpenCode
AnthropicPRIMARY—Proxy✓—✓✓✓
OpenAI—PRIMARYProxy✓—✓✓✓
Google GeminiVertex—Proxy✓PRIMARY✓✓✓
Azure OpenAI—————✓✓✓
AWS Bedrock✓————✓—✓
Cerebras———✓—✓—✓
xAI (Grok)———✓—✓—✓
Groq—————✓—✓
Ollama/local—————✓—✓

Vendor-Locked

Claude Code · Codex · Gemini CLI

Best integration with own models, but no provider choice.

Proxy Routing

Factory

Provider-agnostic via api.factory.ai. Adds latency.

Direct Multi-Vendor

Amp · Pi TS · Pi Rust · OpenCode

User picks any model directly. Maximum flexibility.

04 — Security

Sandbox & Isolation

From full OS-level sandboxing to simple permission prompts — the trust spectrum across all 8 tools.

🛡 Full OS Sandbox

Codex

Landlock + seccomp + bwrap (Linux), sandbox-exec (macOS), restricted token (Windows). Agent truly can't escape.

All platforms

🛡 Full OS Sandbox

Gemini CLI

macOS Seatbelt with 4 profile levels (permissive→restrictive + proxied variants). Docker/Podman containers with volume mounts and network isolation.

macOS + Docker Env var redaction

⚙ Process Sandbox

Claude Code

seccomp filter on Linux only. No macOS equivalent.

Linux only

🧪 Planned WASM

Pi Rust

WASM Components + capability-gated hostcalls for extensions.

Planned

💬 Prompts Only

Factory · Amp · Pi TS · OpenCode

Permission prompts but no real isolation. Docker recommended for Pi TS and OpenCode.

Permission / Approval Modes

ModeClaude CodeCodexFactoryGemini CLIOthers
Allow all--dangerously-skipdanger-full-access--auto highYOLOflags/configs
Auto-edit———AUTO_EDIT—
Read onlypermissionModeread-only--auto lowPLAN—
Defaultprompt eachworkspace-write--auto mediumDEFAULTprompt each
Custom ruleshooks + wildcardsprefix rulestool lists--allowed-tools--tools
05 — Hook / Event Systems

Lifecycle Hooks

Only Claude Code (14 events) and Gemini CLI (11 events) offer shell-based hook systems. Others have zero.

Claude Code — 14 hooks

PreToolUseallow/deny/modify
PostToolUseinformational
UserPromptSubmitinject context
PermissionRequestauto approve/deny
SessionStart / SessionEnd
SubagentStart / SubagentStop
Stopreturn decision
PreCompact / Notification
Setup / TeammateIdle / TaskCompleted

Gemini CLI — 11 hooks

BeforeToolvalidate/block
AfterToolprocess results
BeforeModelmodify/swap/mock
AfterModelfilter/redact
BeforeAgent / AfterAgent
SessionStart / SessionEnd
BeforeToolSelectionfilter/optimize
PreCompress / Notification

✦ Gemini CLI includes BeforeModel/AfterModel hooks for intercepting and modifying LLM calls — a capability absent from the other 7 tools.

AspectClaude CodeGemini CLI
I/O formatJSON via stdin/stdoutJSON via stdin/stdout
Exit codes0=success, 1=error, 2=block0=success, 2=block, other=warning
Timeout10min (configurable)Per-hook ms field
Confighooks.json, skill frontmattersettings.json, extension manifests
06 — Memory Systems

Cross-Session Memory

Three tools persist learning: Claude Code (auto), Codex (two-phase pipeline), Gemini CLI (user-confirmed with hierarchy).

Claude Code

MEMORY.md · Auto-written

Agent writes to MEMORY.md automatically. Project-level storage. First 200 lines loaded into prompt. Hot-reloaded.

Automatic

Codex

memory_summary.md · Two-phase pipeline

Extraction (Spark model) → Consolidation (full model). Skills, rollout summaries. Feature-flagged.

Pipeline

Gemini CLI

GEMINI.md · User-confirmed

save_memory tool with diff + confirmation. Hierarchical: global → ancestors → project → subdirs. Supports @import syntax.

Hierarchical User-confirmed

Others

Factory · Amp · Pi TS · Pi Rust · OpenCode

No built-in cross-session memory. Manual notes or external tools.

07 — Sessions & Context

Session Management

Branching, compaction, rewind, export, and context window strategies across all 8 tools.

FeatureClaude CodeCodexFactoryAmpGemini CLIPi TSPi RustOpenCode
StorageInternalSQLite+JSONLInternalCloudJSON filesJSONL treeJSONL treeKV store
Branching—✓ /fork—Thread fork—✓ /tree /fork✓—
CompactionAuto 98%/compact——/compress/compactAuto—
Resume✓✓✓✓✓ browser✓✓✓
Rewind————✓ + revert/tree nav✓—
Export————/chat share✓ HTML——
Cleanup————✓ auto———
Model switch/model/modelsettingssettings/model/model✓settings
08 — Multi-Agent

Collaboration & Sub-Agents

From dedicated collab tools to experimental A2A protocols — how agents orchestrate work.

🤖 Codex

Full collab tool suite

spawn_agent → send_input → resume_agent → wait → close_agent. Cloud tasks with remote execution. WebSocket transport.

Most complete

🤖 Claude Code

Task tool + Agent Teams

Typed subagents (Bash, Explore, Plan). Background via Ctrl+B. Agent teams with TeammateIdle hooks (research preview).

Teams preview

🤖 Gemini CLI

Sub-agents + A2A

YAML frontmatter agents in .gemini/agents/. Experimental A2A HTTP server (Linux Foundation standard). ACP for Zed integration.

A2A protocol

🤖 Amp

Distributed workers

dtw-create fans out work to remote execution threads.

🤖 Factory

Orchestrator/worker

Decomposes tasks into orchestrator + worker pattern.

—

Pi TS · Pi Rust · OpenCode

No sub-agent support. Pi TS explicitly states "No sub-agents".

09 — Extensibility

Extension Architecture

From full plugin marketplaces to "fork the code" — every level of customization.

🧩 Full Extension API

Pi TS

registerTool(), registerCommand(), events, UI components, themes. Deepest programmatic customization.

Most extensible

🛒 Plugins + Hooks + MCP

Claude Code · 14 hook events

Marketplace registry with hot-reload, auto-update, trust warnings. Skills. Shell hooks on every lifecycle event.

Marketplace

📦 Extensions + Hooks + A2A

Gemini CLI · 11 hook events

gemini-extension.json manifests. Git/GitHub/local sources. Tool discovery commands. MCP + A2A. BeforeModel/AfterModel hooks.

Tool discovery

📋 MCP + Skills + AGENTS.md

Codex

MCP client AND server. GitHub-hosted skills. AGENTS.md per repo. Feature flags system.

🔌 MCP + ACP

Factory · Amp · OpenCode

Add tools via MCP servers. OpenCode adds Agent Client Protocol. Factory uses YAML droid configs.

🔧 Fork the Code

Pi Rust

No plugin system — implement Tool trait and recompile. WASM extensions planned.

10 — Telemetry

Privacy & Telemetry

Three tiers of telemetry: phones home by default, opt-in only, and zero telemetry. A clear spectrum from commercial to open-source.

Claude Code
Phones Home
Segment · Sentry
Datadog · GrowthBook
Codex
Phones Home
Statsig · OTLP
Factory
Phones Home
Segment · Sentry
Datadog + OTel
Amp
Phones Home
Sentry · OTel
Prometheus
Gemini CLI
Opt-In Only
Clearcut · OTel
Default: OFF
Pi (TS)
Zero
No analytics
No tracking
Pi (Rust)
Zero
No analytics
No tracking
OpenCode
Zero
No analytics
No tracking
11 — Summary

If You Want…

Quick decision guide — match your priority to the right tool.

🔒

Max Security

Full OS sandbox on all platforms

→ Codex or Gemini CLI
🧰

Most Built-in Tools

24+ named tools out of the box

→ Claude Code
🧩

Custom Extensions

Full TS API or extension manifests + tool discovery

→ Pi TS or Gemini CLI
⚡

Fastest Startup

<15ms cold start, ~8-15 MB binary

→ Pi Rust
🌐

Any LLM Provider

75+ via Models.dev or 15+ direct

→ OpenCode or Pi TS
🪝

Rich Hook System

14 events (Claude) or 11 with model hooks (Gemini)

→ Claude Code or Gemini CLI
🤖

Multi-Agent Collab

Full collab tools or agent teams

→ Codex or Claude Code
🔕

Commercial + Privacy

Telemetry OFF by default (opt-in)

→ Gemini CLI
🔕

Zero Telemetry (OSS)

No analytics, no phoning home at all

→ Pi TS · Pi Rust · OpenCode
🌳

Session Branching

Tree-structured conversations with fork/navigate

→ Pi TS or Pi Rust
🔙

Session Rewind + Revert

Navigate backward AND revert file state

→ Gemini CLI
🧠

Hierarchical Memory

Global → ancestor → project → subdir memory

→ Gemini CLI
☁️

Cloud / Remote Tasks

Submit to cloud, apply diffs locally

→ Codex
🌐

A2A Protocol

Expose agent as HTTP endpoint (Linux Foundation)

→ Gemini CLI
🖥

Desktop GUI

Beyond terminal — native apps

→ Codex (Electron) · OpenCode (Tauri)
The Semantic Core

Every tool does the same thing at its core

Read system prompt → Stream LLM → Parse tool calls → Execute → Feed back → Loop → Ask permission.

The differences: how many tools (5–24), what runtime (Bun/Rust/Node), which LLMs (1–75+), how they sandbox (none to OS-level), how extensible (MCP-only to full APIs), whether they phone home (opt-out to zero), how rich their hooks are (0–14 events), and how memory persists (none to hierarchical).