# Agent Feature Atlas: Claude Code Deep Dive plus OpenCode/Codex Comparison

Snapshot date: 2026-06-09.

Scope:
- The primary learning path is now a Claude Code source deep dive: input-to-await loop, prompt/context stack, memory/cache, tool runtime, multi-agent orchestration, and gated features.
- OpenCode means the opencode.ai terminal coding agent.
- Codex CLI means OpenAI's Codex terminal client and closely related Codex CLI docs.
- Claude Code has two columns in this analysis:
  - "Claude local source" means what is evidenced in this folder.
  - "Claude current docs" means what Anthropic currently publishes online.

Important caveat: this local Claude Code folder is not a full current release. Some code references feature-gated modules that are not present in this folder, for example `tools/WorkflowTool`, `tools/MonitorTool`, and `tools/PushNotificationTool`.

Rendered artifact:
- Open `feature-comparison-site/index.html` through a local server to use the interactive site.
- The site is now split into focused ES modules: static comparison data, learning-path data, shared render helpers, hash routing, and separate view modules for Start Here, Claude deep dive, prompt/context, tool runtime, multi-agent, gated features, product comparison, and evidence browsing.
- Start at `#start` for the guided learning flow.
- Use `#claudeParity` for the input-to-await loop, then `#promptContext`, `#memoryCache`, `#toolRuntime`, `#multiAgent`, and `#gatedFeatures`.
- Use the comparison section after the Claude deep dive for OpenCode, Codex CLI, Claude local source, and Claude latest docs.
- The generated local-source evidence snapshot is `feature-comparison-site/data/local-claude-evidence.json`.
- Evidence generator: `research/generate-local-evidence.mjs`.
- Evidence validator: `research/validate-local-evidence.mjs`.
- Browser smoke QA: `research/smoke-site.mjs`.
- Smoke QA covers desktop and mobile routes, comparison routes, deep loop links, evidence search terms, module loading, console errors, failed requests, and horizontal overflow.
- Current generated counts: 1,903 source-like files scanned, 96 local slash/bundled skill commands, 40 tool directories, 11 core tool dossiers across 7 tool families, 108 prompt-related files, 8 source-backed message-flow anchors, 11 loop chapters, 12 prompt families, 1 prompt/context top question router with 4 fast route cards, 1 full-width context/cache question entry point with 4 read-order steps and 3 business-logic preview signals, 1 focused context/cache fixture strip, 1 focused worked mechanism diagram with 6 business-decision/value/emitted-object steps, 1 focused stream accounting ledger with 5 provider event rows, 4 cache invariants, and a collapsed reducer skeleton, 1 direct context/cache route-focus with a closed 7-step rebuild-spine drawer and 6-card rebuild contract, 1 focused reducer-sequence diagram with 7 reducer steps, 4 business rules, and a collapsed request-builder skeleton, 1 focused business-logic blackboard with 7 states, 6 branch gates, 6 formulas, and 6 first assertions, 1 focused context/cache coupling diagram with 7 interlock rows collapsed and 5 visible calculations, 1 focused source-to-reducer bridge with 8 source seams and a collapsed 8-card detail drawer, 1 focused exact-emitted-object strip with 6 reducer-boundary snapshots and an expandable TypeScript fixture, 1 focused branch-semantics strip with 5 reducer fork rules and pseudocode, 1 focused golden-test pack with 6 compatibility tests and a collapsed test skeleton, 1 focused runtime-contract strip with 6 state shapes, 6 prompt/context request x-ray state objects, 6 prompt/context request x-ray debugger rows, 6 prompt/context request x-ray snapshots, 6 prompt/context request x-ray branch gates, 3 prompt/context request x-ray equations, 3 prompt/context x-ray drill-down drawers, 1 prompt/context front-door context/cache answer lane with 4 answer-route cards and 7 reducer-preview steps, 1 visible context/cache implementation spine with 6 reducers, 6 source anchors, and 4 object snapshots, 1 cache ownership map with 4 cache layers, 1 state delta ledger with 5 concrete auth-test deltas, 1 context/cache clone-building worksheet with 6 reducer steps and 7 acceptance checks, 5 context/cache progressive drill-down drawers, 5 prompt/context reader-spine routes, 5 prompt/context operating-model transformations, 5 operating-model calculations, 6 prompt/context swimlane handoffs, 5 prompt/context implementation test vectors, 6 prompt/context concrete value-ledger rows, 6 prompt/context clone-kernel stages, 5 clone-kernel golden gates, 8 prompt/context rebuild-map steps, 8 prompt/context concrete turn-trace phases with 6 data contracts, 8 state transitions, 8 sequence handoffs, 4 implementation pseudocode routines, and 5 calculations, 6 prompt/context clean-room workbook modules, 9 prompt/context source-to-rebuild call graph nodes, 8 prompt/context concrete request-trace states, 2 prompt/context business-logic diagrams with 11 nodes, 6 prompt/context implementation-skeleton modules, 6 prompt/context decision tables with 35 rows, 10 prompt/context clean-room acceptance tests with 30 assertions, 6 prompt/context concrete object snapshots, 5 prompt context-source cards, 8 prompt context-assembly ledger steps, 3 prompt context-assembly invariants, 5 prompt-stack precedence branches, 8 prompt-stack composition steps, 3 prompt-stack invariants, 8 prompt/context request-packet steps, 5 prompt cache-accounting formulas, 7 prompt cache-accounting ledger steps, 3 prompt cache-accounting invariants, 7 prompt/context request-building stages, 6 prompt/context implementation recipes, 6 prompt/context module stubs, 8 prompt/context reducer acceptance rows, 3 prompt/context invariants, 8 memory/cache working-set stages, 7 memory/cache implementation recipes, 4 memory/cache invariants, 9 context/memory/cache mechanisms, 7 tool-runtime inventory stages, 8 tool-runtime execution stages, 7 tool-runtime implementation recipes, 5 tool-runtime invariants, 9 multi-agent mechanisms, 10 multi-agent orchestration stages, 7 multi-agent implementation recipes, 6 multi-agent invariants, 18 gated-feature cards, 8 gated-feature resolution stages, 6 gated-feature implementation recipes, and 4 gated-feature invariants.

## Claude Code Deep Dive V2

The site now treats Claude Code understanding as the main product, not a sidebar item. The recommended flow is:

1. **Start Here**: maps questions like "what happens when I type a message?" or "how does memory/cache work?" to the right section.
2. **Input-to-Await Loop**: a diagrammed reconstruction map from input admission to await state, followed by source-cited chapters for Input, Message, History, System, API, Tokens, Tools, Loop, Render, Hooks, and Await. Each chapter separates what the user sees, what the harness does, call-path nodes, key files, branch outcomes, and expandable source evidence.
3. **Prompts & Context**: a worked example from one user message to the provider request. It now opens with a compact source-backed request x-ray for one auth-test prompt: the visible layer shows the fixture, six state objects, a four-step simulator, provider-packet pseudocode, response-side usage truth, and three cache equations; the reducer debugger, boundary object snapshots, branch gates, and source evidence sit behind drill-down drawers. It then continues with a 5-route shortest rebuild path and a front-door context/cache answer lane. The old context/cache question now routes first to `Full worked answer`, and both the top router and the primary question card deep-link to `#promptContext/prompt-context-lanes-answer`; the lane previews the seven reducer steps (`admitTurn`, `assembleContextMaps`, `chooseEffectivePrompt`, `placeContextLanes`, `planPromptCache`, `buildProviderPacket`, `reconcileResponseAccounting`) so the entry point is visible before the long workbook. Direct loads now get an answer-first route-focus panel: a compact fixture/reducer/packet/truth summary, a six-step causal diagram for `ContextMaps`, `EffectivePrompt`, `ProviderLaneInput`, `CachePlan`, `ProviderPacket`, and `ResponseAccounting`, plus a collapsed rebuild contract. On that direct route, the full context/cache algorithm section is rendered immediately after the route-focus panel instead of below the general Prompt & Context intro stack. It starts directly with a concrete answer map showing `rawInput="Fix the failing auth test"`, `cwd=/repo/packages/api`, `history=9`, `messages[9]`, `cache_read=61000`, `cache_creation=9000`, `cache_deleted=17000`, and `deletedTokens=max(0,17000-12000)`. Immediately after the answer map, a visible `Recreate the product logic` board turns the route into an implementation lesson: fixture values, 7 reducers (`admitTurn`, `assembleContextMaps`, `chooseEffectivePrompt`, `projectProviderLanes`, `planPromptCache`, `buildProviderPacket`, `reconcileResponseAccounting`), final provider/accounting fields, a collapsed `context-cache-turn.ts` skeleton, and 8 acceptance assertions including the `messages[9]` cache-control target and `deletedTokens === 5000`. After that, the focused answer makes the hidden transforms visible before the reducer sequence: a worked packet transformer for `ContextMaps -> ProviderLaneInput -> CachePlan -> ResponseAccounting`, a prompt-authority transformer for hard-coded prompt precedence and cacheability classes, and a stream accounting ledger showing `message_start`, `message_delta`, delete delta, warning gate, provider cache truth, no-zero-overwrite behavior, deletion baseline math, and `cacheBreakWarning=null`. The focused reducer-sequence diagram then turns "context assembly and prompt-cache accounting" into seven executable reducers: `admitTurn(rawInput)`, `assembleContextMaps(repo)`, `chooseEffectivePrompt(authority)`, `placeContextLanes(prompt, maps, history)`, `planPromptCache(lanes)`, `buildProviderPacket(lanes, tools, plan)`, and `reconcileResponseAccounting(events)`. It also names four business rules a clone must preserve: context split, authority split, cache marker placement, and provider usage truth, with a collapsed request-builder skeleton. Immediately after that sequence, a focused business-logic blackboard makes the exact clone contract visible: seven emitted states, six branch gates, six cache formulas, and six first assertions including `providerMessages.length - 1 = 9`, `assert(packet.promptState.markerIndex === 9)`, and `assert(accounting.deletedTokens === 5000)`. A focused coupling diagram follows, showing where context assembly changes prompt-cache accounting: lane placement creates `providerMessages.length=10`, which drives `markerIndex=9`; `skipCacheWrite` moves that to `8`; provider usage then settles `cache_read=61000`, `cache_creation=9000`, `cache_deleted=17000`, and `deletedTokens=5000` without rewriting context lanes. A compact source-to-reducer bridge then maps `handlePromptSubmit`, `processUserInput / processTextPrompt`, `fetchSystemPromptParts + getClaudeMds`, `buildEffectiveSystemPrompt`, `messagesForQuery projection`, `appendSystemContext / prependUserContext`, `buildSystemPromptBlocks / addCacheBreakpoints`, and `updateUsage / checkResponseForCacheBreak` to clean-room modules, with the eight detailed source/emits/first-test cards collapsed behind an `Open the detailed source-to-test cards` drawer. The five-row state delta ledger for `RawTurn`, `ContextMaps`, `ProviderLaneInput`, `ProviderPacket`, and `ResponseAccounting` appears after that bridge, followed by a focused exact-emitted-object strip with six reducer-boundary snapshots (`RawTurn`, `ContextMaps`, `ProviderLaneInput`, `CachePlan`, `ProviderPacket`, `ResponseAccounting`) and an expandable TypeScript fixture containing `rawTurn`, `maps`, `lanes`, `cachePlan`, `packet`, and `accounting`. A focused branch-semantics strip then makes five reducer forks explicit: `customSystemPrompt`, `skipCacheWrite fork`, pending `cache_edits`, output-only stream deltas, and unexplained cache-read drops, with pseudocode for `applyContextCacheBranches`. A focused golden-test pack follows with six compatibility tests and a collapsed vitest-style skeleton for `admitContextCacheTurn(authFixture)`, cache-marker placement, custom prompt authority, cached microcompact edits, stream usage deltas, and cache-warning thresholds. The visible single-turn packet diagram then appears before the focused runtime contracts and implementation spine. The route continues with the six-state runtime-contract strip, visible implementation spine, cache ownership map, visible six-module implementation map (`context-loader`, `prompt-authority`, `lane-projector`, `cache-planner`, `request-builder`, `response-accounting`) with first acceptance tests, visible seven-row branch test matrix for custom prompts, disabled memory, coordinator/agent prompt authority, throwaway forks, cache edits, output-only deltas, and unexplained cache-read drops, and a collapsed six-state reducer walkthrough for one auth-test turn. That landing also has a packet-shape drawer for the four provider lanes and `params = { system, messages, tools, cache_control }`, a context-lane resolver for CLAUDE.md/date/git/cache-breaker/custom prompt placement, an executable reducer trace drawer with six concrete calls and assertions such as `assertEqual(packet.markerIndex, 9)` and `assertEqual(accounting.deletedTokens, 5000)`, a prompt-authority resolver for `overrideSystemPrompt`, coordinator, agent, custom, and default prompt precedence plus cacheable/dynamic/uncached section classes, and a cache-mechanics calculator drawer for marker placement (`normalTurn.markerIndex = 10 - 1 = 9`, `throwawayFork.markerIndex = 10 - 2 = 8`) and stream usage merge (`usage.output_tokens === 410`). A build-from-scratch worksheet and the full concrete worked lab now sit at that landing as drill-downs with the reducers to implement first, the exact auth-test fixture, expected provider packet, acceptance checks, code skeletons, emitted objects, evidence, and cache math. The context/cache algorithm bridge remains source-backed with a 7-node implementation state diagram, 7-row decision matrix, reducer recipe, typed contracts, cache worksheet, module stubs, acceptance tests, failure modes, concrete lab, implementation contracts, fixtures, branch rules, formulas, and evidence, but the dense contract/test/source ledgers, full state diagram, concrete lab, prompt-authority resolver, executable trace, and cache calculators start collapsed where needed so the page reads as an explainer before it becomes a workbook. The rest of the page carries the source-to-rebuild bridge, swimlane, reducer recipe, operating model, value ledger, implementation vectors, clone kernel, concrete turn trace, rebuild map, workbook, source call graph, object trace, business-logic diagrams, implementation skeleton, decision tables, acceptance suite, object snapshots, context assembly, prompt stack, request packet, cache accounting, and prompt-family source lookup.
4. **Memory & Cache**: a worked lifecycle for the provider working set versus durable transcript storage, including compact-boundary projection, effective context-window thresholds, tool-result budget/snip/microcompact ordering, cached microcompact and `cache_edits`, session-memory-first compaction, legacy summary rebuild, prompt-too-long recovery, transcript parent-chain persistence, and response-side cache accounting.
5. **Tools & Permissions**: a diagrammed worked example from model-visible tool pool to recursive model turn, including registry/MCP filtering, `toolToAPISchema` schema caching, streamed `tool_use` detection, input validation, PreToolUse hooks, `hasPermissionsToUseToolInner` permission precedence, sandbox/classifier behavior, concurrency-safe execution, bounded `tool_result` serialization, PostToolUse hooks, and follow-up loop recursion.
6. **Multi-Agent**: a diagrammed worked example for delegation shape selection, AgentTool prompt/schema exposure, fresh versus forked child setup, `buildForkedMessages`, `createSubagentContext`, worker tool/model/MCP resolution, worktree isolation, sync versus async launch, task-notification re-entry, `SendMessage` continuation, teams/tasks, and `COORDINATOR_MODE`.
7. **Gated/Unreleased**: a diagrammed gate-resolution pipeline for build-time `feature('FLAG')` imports, registry/internal filtering, `USER_TYPE`, `CLAUDE_INTERNAL_FC_OVERRIDES`, cached versus blocking GrowthBook checks, activation paths, safety overlays, remote/background handoff, referenced-missing modules such as `WorkflowTool`, and conservative present/gated/internal/referenced/absent classification.

The heavy raw inventories remain available but are collapsed behind drawers on the main teaching pages to reduce the boxed, wall-of-cards feel. The Prompt & Context page no longer uses the old cramped right-side "Context question" sidebar; it now opens with a full-width `Start here: context/cache question` entry point, a visible `Open full worked answer` action, and a six-state `Worked example mini-map` instead of the old tiny five-card board. That mini-map shows `Typed turn` (`admitTurn(rawInput)`), `Context split` (`assembleContextMaps(repo)`), `Provider lanes` (`projectProviderLanes(prompt,maps,history)`), `Cache marker` (`planPromptCache(lanes)`), `Request packet` (`buildProviderPacket(plan)`), and `Usage truth` (`reconcileResponseAccounting(stream)`) with concrete auth-test values such as `providerMessages.length=10`, `markerIndex=9`, `params.messages[9].content[-1].cache_control`, `cache_read=61000`, and `deletedTokens=5000`. The front door now also has a four-card business-logic proof strip (`RawTurn`, `ContextMaps`, `ProviderPacket`, `ResponseAccounting`) that states the first rebuild invariants: `rawInput + cwd + history=9`, `CLAUDE.md/date user lane; git/cache system lane`, `cache_control mutates params.messages[9], not transcript`, and `provider usage wins; deletedTokens=5000`. The adjacent four-card "what opens first" strip (`Reducer transaction`, `Context resolver`, `State register`, `Watch/code`) explains the route before the reader enters the workbook. The entry names the eight-step implementation path (`Answer map`, `Reducer transaction`, `Context resolver`, `State register`, `Mechanics map`, `Logic trace`, `Execution ledger`, `Watch the turn + Code this first`) before the compact route cards. The direct context/cache deep link opens with a lighter route-focus primer, an eight-step read-order rail instead of duplicated closed spine/contract drawers, then a concrete answer map and a new `Single-turn circuit` diagram before the reducer table. That circuit diagram connects `RepoContextInput -> ContextMaps -> ProviderPacket -> ResponseAccounting` with the exact branch and boundary rules: `customSystemPrompt` suppresses default system diagnostics, `skipCacheWrite` moves `markerIndex` from 9 to 8, `cache_control` mutates only `params.messages[9].content[-1]`, and the first clone test asserts `providerMessages.length===10`, clean transcript state, and `deletedTokens===5000`. After the circuit, the focused route continues with the visible `Actual reducer transaction`, `Context source resolver`, `State register diagram`, `Mechanics map`, `Executable business logic trace`, and `Worked example ledger`. The reducer transaction shows 7 reducers (`admitTurn`, `assembleContextMaps`, `chooseEffectivePrompt`, `projectProviderLanes`, `planPromptCache`, `buildProviderPacket`, `reconcileResponseAccounting`) with consumes/emits/first-assertion fields plus 5 formulas for lane count, cache target, provider packet mutation, usage merge, and deletion delta. The context resolver shows 6 source-to-lane rows (`admitTurn`, `getClaudeMds`, `fetchSystemPromptParts`, `queryContext`, `prependUserContext`, `planPromptCache`) plus 4 ownership lanes for user, system, provider, and cache state, so the CLAUDE.md/date/git/cache split is explicit before cache-marker math. The state register turns the answer into in-process clone state: 7 trace registers (`trace.rawTurn`, `trace.maps`, `trace.prompt`, `trace.lanes`, `trace.plan`, `trace.packet`, `trace.accounting`), each with reducer, source/clone module seam (`prompt/context-loader.ts :: queryContext -> getClaudeMds -> fetchSystemPromptParts`, `prompt/response-accounting.ts :: updateUsage -> checkResponseForCacheBreak`, etc.), reads, writes, invariant, a transcript/provider/prompt/response boundary diff, and a collapsed first-test drawer. The mechanics map is the source-to-output diagram: 3 lanes and 9 nodes connect `queryContext -> getClaudeMds -> fetchSystemPromptParts`, `messagesForQuery -> prependUserContext -> addCacheBreakpoints`, and `beta.messages.create stream -> updateUsage -> checkResponseForCacheBreak`; its coupling strip states the business logic that `providerMessages.length=10` selects `messages[9]`, `cache_control` is a provider-boundary-only mutation, and provider stream usage wins for cache truth. The logic trace turns that diagram into reducer code for the auth-test fixture: 4 fixture values, 6 reducer rows (`assembleContextMaps` through `reconcileResponseAccounting`), and 5 branch choices (`customSystemPrompt=false`, `skipCacheWrite=false`, `cache_edits=[]`, transcript hygiene, and `cache_deleted 17000 - baselineDeleted 12000 -> deletedTokens 5000`). The ledger then gives 4 formulas (`projectedTranscriptRows`, `providerMessages.length`, `markerIndex`, `deletedTokens`) and 7 reducer-boundary rows with exact reads, business rules, emitted objects, and first assertions from `admitTurn` through `reconcileResponseAccounting`. The ccunpacked-style `Watch the turn execute` stepper and the `Code this first` rebuild recipe follow before the longer diagrams: 7 state objects (`RawTurn`, `ContextMaps`, `EffectivePrompt`, `ProviderLaneInput`, `CachePlan`, `ProviderPacket`, `ResponseAccounting`), 6 business rules, a reducer skeleton for `runPromptContextTurn(turn, runtime)`, and 6 first compatibility tests for provider message count, marker index, provider-boundary `cache_control`, transcript cleanliness, `cache_read=61000`, and `deletedTokens=5000`. The v50 worked transaction, retained branch table, v47 executable dataflow, v41 business diagram, flight recorder, business trace, rebuild workbench, packet transformer, prompt-authority transformer, stream accounting ledger, source bridge, object snapshots, branch semantics, golden tests, runtime contracts, implementation spine, cache ownership map, module blueprint, and branch matrix remain available after that recipe, with dense contracts and source ledgers collapsed where needed. Playwright QA on cache token `20260613-circuit-diagram-76` now runs with system Chrome when the Playwright cache browser is missing; it verifies the front-door six-state mini-map, four-card proof strip, four-card front-door open-path strip, focused route rail, focused single-turn circuit diagram, reducer-transaction content/order/overflow/height, context-resolver content/order/overflow, state-register module/source seams, state-register content/order/overflow, mechanics map ordering/content, logic trace ordering/content, ledger formulas/rows/content, scroll-only ledger button, 7 watch stage clicks, 7 recipe state rows, 6 rule cards, 6 compatibility tests, zero mini-map/proof-strip/front-door-open-path/circuit/reducer-transaction/context-resolver/state-register/trace/ledger/watch/recipe/document overflow, and full smoke passes. Memory & Cache, Tools & Permissions, Multi-Agent, and Gated/Unreleased continue to use the same reconstructable format for working-set lifecycle, durable-state rules, tool execution logic, child-agent orchestration, and gate-resolution logic. The `#tools` route still leads with source-backed core Claude tool dossiers for Bash, Read, Edit, Write, TodoWrite, Glob, Grep, WebFetch, WebSearch, Agent, and MCP resources before the old cross-product inventory.

Latest v76 visible guidance: the focused `#promptContext/prompt-context-lanes-answer` route now inserts a `Single-turn circuit` diagram between the answer map and reducer transaction. It connects `RepoContextInput -> ContextMaps -> ProviderPacket -> ResponseAccounting` and makes the branch/boundary rules visible before the dense reducer table: `customSystemPrompt` suppresses system diagnostics, `skipCacheWrite` moves `markerIndex` from 9 to 8, `cache_control` is request-local on `params.messages[9].content[-1]`, and the first clone test checks `providerMessages.length===10`, clean transcript state, and `deletedTokens===5000`. QA covers the front-door mini-map/proof/open-path strips, focused circuit diagram, reducer transaction, context resolver, state register, mechanics map, logic trace, ledger content and scroll button, all 7 watch stage clicks, desktop/mobile layout, and zero mini-map/proof-strip/front-door-open-path/circuit/reducer-transaction/context-resolver/state-register/trace/ledger/watch/document overflow.

The loop evidence validator now fails if a loop chapter lacks source references, `userVisible`, `harnessAction`, or source-backed branch outcomes.

## Source Links

Claude Code:
- Current overview: https://code.claude.com/docs/en/overview
- Current commands reference: https://code.claude.com/docs/en/commands
- Current tools reference: https://code.claude.com/docs/en/tools-reference
- Current permission modes: https://code.claude.com/docs/en/permission-modes
- Current `/goal`: https://code.claude.com/docs/en/goal
- Current dynamic workflows: https://code.claude.com/docs/en/workflows
- Current parallel agents: https://code.claude.com/docs/en/agents
- Current skills: https://code.claude.com/docs/en/skills
- Current MCP: https://code.claude.com/docs/en/mcp
- Current platforms: https://code.claude.com/docs/en/platforms
- Current docs index: https://code.claude.com/docs/llms.txt

Codex CLI:
- CLI overview: https://developers.openai.com/codex/cli
- CLI features: https://developers.openai.com/codex/cli/features
- Slash commands: https://developers.openai.com/codex/cli/slash-commands
- Permissions: https://developers.openai.com/codex/permissions
- AGENTS.md: https://developers.openai.com/codex/guides/agents-md
- MCP: https://developers.openai.com/codex/mcp
- Skills: https://developers.openai.com/codex/skills
- Plugins: https://developers.openai.com/codex/plugins
- Subagents: https://developers.openai.com/codex/subagents
- Open-source repo: https://github.com/openai/codex

OpenCode:
- Intro: https://opencode.ai/docs/
- TUI: https://opencode.ai/docs/tui/
- CLI: https://opencode.ai/docs/cli/
- Web: https://opencode.ai/docs/web/
- IDE: https://opencode.ai/docs/ide/
- Tools: https://opencode.ai/docs/tools/
- Permissions: https://opencode.ai/docs/permissions/
- Agents: https://opencode.ai/docs/agents/
- Providers: https://opencode.ai/docs/providers/
- MCP: https://opencode.ai/docs/mcp-servers/
- Commands: https://opencode.ai/docs/commands/
- Plugins: https://opencode.ai/docs/plugins/

Local Claude source anchors:
- `commands.ts`
- `tools.ts`
- `skills/bundled/index.ts`
- `skills/bundled/loop.ts`
- `tools/BashTool/BashTool.tsx`
- `utils/permissions/PermissionMode.ts`
- `utils/sandbox/sandbox-adapter.ts`

## Executive Summary

| Area | OpenCode | Codex CLI | Claude local source | Claude current docs |
|---|---|---|---|---|
| Main posture | Open-source, provider-agnostic coding agent | OpenAI local coding agent, open-source Rust CLI | Anthropic CLI source snapshot with many gated/internal features | Full Anthropic agent platform across CLI, IDE, desktop, web, mobile |
| Model support | Strongest provider breadth: 75+ providers plus local models | OpenAI-centered, with current docs also exposing OSS/Ollama option and config profiles | Claude/Anthropic-centered, with Bedrock/Vertex/3P integration code paths | Claude subscriptions/API plus Bedrock, Vertex, Foundry, third-party providers in some surfaces |
| Slash command depth | Smaller built-in set, strong custom command support | Broad command set including `/goal`, `/plan`, `/agent`, `/plugins`, `/skills`, `/hooks` | Broad but older/different set; many commands, bundled skills, internal commands | Largest documented command set |
| Agent orchestration | Primary agents plus subagents, explicit `@` mentions | Subagents enabled by default; explicit spawning only | AgentTool, task/team tools, worktree/remote isolation references | Subagents, agent view, agent teams, dynamic workflows |
| Extensibility | Custom commands, custom tools, MCP, plugins, custom agents | MCP, skills, plugins, hooks, apps/connectors | MCP, skills, plugins, hooks, agents, tool search | Same plus more published workflows and plugin/skills model |
| Safety model | Permission keys: allow/ask/deny, including per-tool and per-agent | Approval modes, sandbox profiles, filesystem/network permission profiles | Permission modes, allow/deny rules, sandbox adapter, auto mode code paths | Permission modes, auto mode, sandboxed Bash, dev containers, VMs, managed settings |
| Best learning value | Clean open-source architecture for multi-provider terminal agent | Modern Rust CLI + OpenAI productized agent controls | Mature commercial CLI architecture; rich local code to inspect | Current product direction and feature targets |

## Like-for-like Feature Matrix

| Feature or ability | OpenCode | Codex CLI | Claude local source | Claude current docs | Notes |
|---|---|---|---|---|---|
| Terminal TUI | Yes | Yes | Yes | Yes | All three are terminal-first. |
| Non-interactive prompt mode | Yes, documented CLI usage | Yes, `codex "prompt"` and automation modes | Present via print/SDK style entrypoints in source | Yes, CLI and Agent SDK | Codex and Claude document this more explicitly. |
| Web UI | Yes, `opencode web` | Codex app/web are related but not the CLI itself | Remote/web session code paths exist | Yes, Claude Code on web | OpenCode can serve local web UI directly. |
| Desktop app | Yes, current OpenCode intro lists terminal, desktop app, and IDE extension | Codex app exists, separate from CLI | `/desktop` command present | Yes | Claude current docs emphasize visual diff review and parallel sessions. |
| IDE support | VS Code/forks auto-install extension | IDE extension documented | `/ide` command and LSP/IDE integration code present | VS Code and JetBrains | Claude and Codex have deeper current IDE docs. |
| Mobile/remote continuation | Not a core documented TUI feature | Codex app/web ecosystem | `/mobile`, `/remote-control`, `/teleport` code present | Web/mobile/Remote Control/Dispatch | Claude is strongest here. |
| Chrome/browser integration | Not comparable in docs found | Not a core CLI feature in the reviewed Codex CLI docs | `/chrome`, Claude-in-Chrome utilities present | Chrome extension beta, computer use preview | Claude is strongest for browser-debugging workflow. |
| Multi-provider model support | Yes, 75+ providers and local models | Mostly OpenAI; docs include `--oss` for local OSS provider | Anthropic/Claude-centered | Claude plus Bedrock/Vertex/Foundry/third-party provider docs | OpenCode is clearest winner for provider neutrality. |
| Model selection | `/models`; provider config | `/model`, `--model`, config | `/model`, `/effort`, model config | `/model`, `/effort`, model aliases | All support model selection. |
| Reasoning/effort control | Model variants/thinking display | `/model` and reasoning effort where available | `/effort`, model picker | `/effort` low/medium/high/xhigh/max/ultracode | Claude current docs have richest effort vocabulary. |
| File read/edit/write | Yes: read, edit, write, apply_patch | Yes, can read/change files and show diffs | Read/Edit/Write tools | Read/Edit/Write tools | All core-capable. |
| Shell execution | Yes: bash | Yes: commands in sandbox | Bash and PowerShell tools | Bash and PowerShell tools | Claude current docs document PowerShell deeply. |
| Background shell tasks | Not a highlighted docs feature | `/ps`, `/stop` background terminals | Bash `run_in_background`, `/tasks` | `/tasks`, `/background`, Monitor tool | Claude local has background tasks but current docs add more surfaces. |
| Web search/fetch | Yes: websearch, webfetch | Yes: first-party web search | WebSearch/WebFetch tools | WebSearch/WebFetch tools | All three have a current or source-evidenced web search/fetch-style capability. |
| LSP/code intelligence | Experimental LSP tool | IDE context; no CLI tool table equivalent found | LSPTool, services/lsp | LSP tool via code intelligence plugins | OpenCode and Claude expose this as a tool concept. |
| Notebook editing | Not in OpenCode tool list | Not prominently documented in CLI feature list | NotebookEditTool present | NotebookEdit documented | Claude has this explicitly. |
| MCP | Local and remote MCP, OAuth | CLI and IDE support STDIO and HTTP, OAuth | MCP manager/tools/resources/auth | Full MCP with scopes, OAuth, prompts, resources, tool search | All three support MCP. |
| MCP prompts as slash commands | Not found in OpenCode docs reviewed | MCP tool support; slash command prompt mapping not highlighted | MCP command/tooling present | Yes, `/mcp__server__prompt` | Claude documents this clearly. |
| Custom commands | Yes, strong docs; markdown/config | `/init` for AGENTS.md; not same custom slash command model in CLI docs | Skills/custom commands loaders present | Skills/custom commands merged | OpenCode and Claude have native custom slash-command concepts. |
| Skills | Yes, `skill` tool and agent skills docs | Yes, open agent skills standard | SkillTool and bundled skills present | Yes, built-in and user skills | Claude/Codex share the open skills pattern. |
| Plugins/marketplace | Yes, plugins extend tools/hooks/integrations | Yes, plugins bundle skills/apps/MCP | `/plugin`, plugin loader, marketplace code | Yes | All three support extension packages. |
| Hooks | Not central in retrieved OpenCode docs, plugins can extend hooks | Yes, lifecycle hooks | `/hooks`, hook utilities | Extensive hook events and prompt/agent hooks | Claude current docs are most advanced here. |
| Permissions | allow/ask/deny, per tool, per agent | approval modes and beta permission profiles | default/plan/acceptEdits/dontAsk/bypass/auto | default/acceptEdits/plan/auto/dontAsk/bypass | All have permission concepts; Codex/Claude have stronger sandbox-policy language. |
| Sandbox | Permission-based; no strong OS sandbox docs found in OpenCode pages reviewed | sandbox modes/profiles with filesystem/network profiles | sandbox-runtime adapter, `/sandbox` command | sandboxed Bash, dev containers, Docker, VMs | Claude local has concrete sandbox runtime code. |
| Plan mode | Plan agent | `/plan` | `/plan`, Enter/ExitPlanMode tools | `/plan` | Present in all three, implemented differently. |
| Goal loop | Not found as built-in | `/goal` documented | Not found as local command | `/goal` documented | Your example: Claude current and Codex have `/goal`; OpenCode docs do not show an equivalent built-in. |
| Repeating loop | Not found as built-in | `/goal` but no `/loop` in CLI command list | `/loop` bundled skill gated by AGENT_TRIGGERS | `/loop` bundled skill | Claude has explicit scheduled loop. |
| Scheduled/recurring tasks | Not found as core TUI feature | Codex automations exist outside CLI; no core CLI slash command found | Cron tools and schedule skill gated | `/schedule`, routines, `/loop` | Claude is strongest here. |
| Subagents | Built-in General/Explore/Scout, custom agents | Subagents enabled by default, explicit spawn | AgentTool, agent configs, worktree/remote isolation | Subagents, background subagents, forks | All have some form; Claude current has broadest taxonomy. |
| Agent teams | Not found in OpenCode docs reviewed | Subagents only in docs reviewed | TeamCreate/TeamDelete/SendMessage tools | Agent teams documented | Claude local/current has team architecture. |
| Dynamic workflows | Not found in OpenCode docs reviewed | Workflows concept appears in Codex docs nav, but CLI feature list focuses subagents | References exist, implementation dirs absent from this folder | Workflow tool and `/workflows` documented | Claude current docs list this as research preview. |
| Worktrees | Not a highlighted OpenCode docs feature | Codex current docs emphasize subagents rather than a standalone CLI worktree command | EnterWorktree/ExitWorktree tools and worktree isolation | Worktrees documented | Claude local/current has explicit tools. |
| Conversation resume/fork/branch | sessions/resume, undo/redo | `/resume`, `/fork`, local transcripts | `/resume`, `/branch`, `/rewind` | `/resume`, `/branch`, `/fork`, `/rewind` | All support session continuity; Claude has checkpoint rewind. |
| Undo/redo file changes | `/undo`, `/redo` | Diff/review; no direct undo/redo command in slash list | `/rewind` checkpoints | `/rewind`, checkpointing | OpenCode has explicit undo/redo. |
| Diff review | Not in OpenCode command list retrieved, but can edit files | `/diff`, `/review` | `/diff`, `/review`, `/security-review`, `/ultrareview` | `/diff`, `/code-review`, `/simplify`, `/review`, `/security-review`, `/code-review ultra` | Claude current has the broadest review matrix. |
| Git commit/PR helpers | Can run shell; no built-in PR command found in docs reviewed | Can run git/gh; review features | `commit`, `commit-push-pr`, GitHub app setup | Commits/PRs, GitHub Actions, PR review | Local commit helpers are internal-only in `commands.ts`. |
| Usage/cost visibility | Not highlighted in docs reviewed | `/status` includes config/token usage | `/cost`, `/usage`, `/stats`, `/extra-usage` | `/usage` with breakdown by skill/subagent/plugin/MCP | Claude has richer usage accounting. |
| Context management | `/compact` | `/compact`, context stats in `/status` | `/compact`, `/context`, context suggestions | `/compact`, `/context`, context-window docs | Claude provides most detailed context introspection. |
| Persistent instructions | AGENTS.md via `/init` | AGENTS.md layered discovery | CLAUDE.md memory files | CLAUDE.md plus auto memory | OpenCode/Codex standardize on AGENTS.md; Claude on CLAUDE.md. |
| Memory | Not found in OpenCode docs reviewed beyond rules/instructions | `/memories` | `/memory`, auto-memory settings | `/memory`, auto memory | Claude and Codex current docs both have memory. |
| Tool search | Not highlighted in OpenCode docs reviewed | MCP/tool schemas and plugins; tool search in OpenAI platform docs | ToolSearchTool present | MCP Tool Search documented | Claude local/current has a dedicated ToolSearch tool. |
| SDK/server mode | SDK and server docs, `opencode serve` | Codex SDK, app-server, MCP-server docs | SDK entrypoints present | Agent SDK | All three have automation surfaces, with different maturity. |

## Slash Commands: Current Official Lists

### OpenCode current documented built-ins

From the OpenCode TUI docs:

`/connect`, `/compact` alias `/summarize`, `/details`, `/editor`, `/exit` aliases `/quit` and `/q`, `/export`, `/help`, `/init`, `/models`, `/new` alias `/clear`, `/redo`, `/sessions` aliases `/resume` and `/continue`, `/share`, `/themes`, `/thinking`, `/undo`, `/unshare`.

OpenCode also supports custom commands from `.opencode/commands/*.md` or config. Custom commands can include arguments, shell output injection, file references, a target agent, a model override, and subtask behavior.

### Codex CLI current documented built-ins

From the Codex CLI slash command docs:

`/permissions`, `/ide`, `/keymap`, `/vim`, `/sandbox-add-read-dir`, `/agent`, `/apps`, `/plugins`, `/hooks`, `/clear`, `/compact`, `/copy`, `/diff`, `/exit`, `/experimental`, `/approve`, `/memories`, `/skills`, `/feedback`, `/init`, `/logout`, `/mcp`, `/mention`, `/model`, `/fast`, `/plan`, `/goal`, `/personality`, `/ps`, `/stop`, `/fork`, `/side`, `/btw`, `/raw`, `/resume`, `/new`, `/quit`, `/review`, `/status`, `/debug-config`, `/statusline`, `/title`, `/theme`.

Notable like-for-like point: Codex has `/goal`, `/plan`, `/agent`, `/fork`, `/side`/`/btw`, `/plugins`, `/skills`, `/hooks`, `/mcp`, `/memories`, and `/review`.

### Claude Code current documented built-ins and bundled skills

From the Claude Code commands reference:

`/add-dir`, `/agents`, `/autofix-pr`, `/background`, `/batch`, `/branch`, `/btw`, `/chrome`, `/claude-api`, `/clear`, `/code-review`, `/color`, `/compact`, `/config`, `/context`, `/copy`, `/cost`, `/debug`, `/deep-research`, `/desktop`, `/diff`, `/doctor`, `/effort`, `/exit`, `/export`, `/fast`, `/feedback`, `/fewer-permission-prompts`, `/focus`, `/fork`, `/goal`, `/heapdump`, `/help`, `/hooks`, `/ide`, `/init`, `/insights`, `/install-github-app`, `/install-slack-app`, `/keybindings`, `/login`, `/logout`, `/loop`, `/mcp`, `/memory`, `/mobile`, `/model`, `/passes`, `/permissions`, `/plan`, `/plugin`, `/powerup`, `/privacy-settings`, `/radio`, `/recap`, `/release-notes`, `/reload-plugins`, `/reload-skills`, `/remote-control`, `/remote-env`, `/rename`, `/resume`, `/review`, `/rewind`, `/run`, `/run-skill-generator`, `/sandbox`, `/schedule`, `/scroll-speed`, `/security-review`, `/setup-bedrock`, `/setup-vertex`, `/simplify`, `/skills`, `/stats`, `/status`, `/statusline`, `/stickers`, `/stop`, `/tasks`, `/team-onboarding`, `/teleport`, `/terminal-setup`, `/theme`, `/tui`, `/ultraplan`, `/ultrareview`, `/upgrade`, `/usage`, `/usage-credits`, `/verify`, `/voice`, `/web-setup`, `/workflows`.

The docs also mention removed or older commands such as `/pr-comments` and `/vim`.

## Claude Current vs This Local Source

Legend:
- Present: implementation or command is clearly present in this folder.
- Present as skill/gated: present as a bundled skill or feature-gated code path.
- Referenced but missing impl: source references the feature, but implementation directory/file is absent in this folder.
- Not found: no evidence found by local search.
- Older/different: local source has an older name or behavior.

| Current Claude feature | Local source status | Evidence |
|---|---|---|
| `/add-dir` | Present | `commands/add-dir`, `commands.ts` |
| `/agents` | Present | `commands/agents`, `tools/AgentTool` |
| `/autofix-pr` | Present, internal-only in command registry | `commands/autofix-pr`, `INTERNAL_ONLY_COMMANDS` in `commands.ts` |
| `/background` | Not found as slash command; background task behavior exists | `tools/BashTool/BashTool.tsx`, `/tasks` |
| `/batch` | Present as bundled skill | `skills/bundled/batch.ts` |
| `/branch` | Present | `commands/branch` |
| `/btw` | Present | `commands/btw` |
| `/chrome` | Present | `commands/chrome`, `utils/claudeInChrome` |
| `/claude-api` | Present as gated bundled skill | `skills/bundled/claudeApi.ts`, `BUILDING_CLAUDE_APPS` |
| `/clear` | Present | `commands/clear` |
| `/code-review` | Not found | Local has `/review`, `/security-review`, `/ultrareview`, `/simplify` |
| `/color` | Present | `commands/color` |
| `/compact` | Present | `commands/compact` |
| `/config` | Present | `commands/config` |
| `/context` | Present | `commands/context` |
| `/copy` | Present | `commands/copy` |
| `/cost` | Present | `commands/cost`; current docs alias to `/usage` |
| `/debug` | Present as bundled skill | `skills/bundled/debug.ts` |
| `/deep-research` | Not found | No local command/skill evidence |
| `/desktop` | Present | `commands/desktop` |
| `/diff` | Present | `commands/diff` |
| `/doctor` | Present | `commands/doctor` |
| `/effort` | Present | `commands/effort` |
| `/exit` | Present | `commands/exit` |
| `/export` | Present | `commands/export` |
| `/fast` | Present | `commands/fast` |
| `/feedback` | Present | `commands/feedback` |
| `/fewer-permission-prompts` | Not found | No local command/skill evidence |
| `/focus` | Not found as command | UI focus terms exist, not the documented command |
| `/fork` | Referenced/gated; older branch alias exists | `forkCmd` feature gate absent impl; `commands/branch` aliases `fork` when feature off |
| `/goal` | Not found | No local command/skill evidence |
| `/heapdump` | Present | `commands/heapdump` |
| `/help` | Present | `commands/help` |
| `/hooks` | Present | `commands/hooks`, `utils/hooks` |
| `/ide` | Present | `commands/ide`, `services/lsp` |
| `/init` | Present | `commands/init.ts` |
| `/insights` | Present | `commands/insights.ts`, lazy command in `commands.ts` |
| `/install-github-app` | Present | `commands/install-github-app` |
| `/install-slack-app` | Present | `commands/install-slack-app` |
| `/keybindings` | Present | `commands/keybindings` |
| `/login`, `/logout` | Present | `commands/login`, `commands/logout` |
| `/loop` | Present as gated bundled skill | `skills/bundled/loop.ts`, `AGENT_TRIGGERS` |
| `/mcp` | Present | `commands/mcp`, MCP tools |
| `/memory` | Present | `commands/memory`, memory services |
| `/mobile` | Present | `commands/mobile` |
| `/model` | Present | `commands/model` |
| `/passes` | Present | `commands/passes` |
| `/permissions` | Present | `commands/permissions`, permission modes |
| `/plan` | Present | `commands/plan`, Enter/ExitPlanMode tools |
| `/plugin` | Present | `commands/plugin`, aliases `plugins`, `marketplace` |
| `/powerup` | Not found | No local command evidence |
| `/pr-comments` | Older/different | `commands/pr_comments` exists as moved-to-plugin command; current docs say removed |
| `/privacy-settings` | Present | `commands/privacy-settings` |
| `/radio` | Not found | No local command evidence |
| `/recap` | Not found as command | `services/awaySummary.ts` exists but not `/recap` |
| `/release-notes` | Present | `commands/release-notes` |
| `/reload-plugins` | Present | `commands/reload-plugins` |
| `/reload-skills` | Not found | No local command evidence |
| `/remote-control` | Present/gated | `commands/bridge` has name `remote-control`, alias `rc` |
| `/remote-env` | Present | `commands/remote-env` |
| `/rename` | Present | `commands/rename` |
| `/resume` | Present | `commands/resume`, alias `continue` |
| `/review` | Present | `commands/review.ts` |
| `/rewind` | Present | `commands/rewind`, alias `checkpoint` |
| `/run` | Not found | No local bundled skill named `run` found |
| `/run-skill-generator` | Referenced/gated, impl missing | `skills/bundled/index.ts` references `runSkillGenerator.js`; no local TS file found |
| `/sandbox` | Present | `commands/sandbox-toggle`, `utils/sandbox/sandbox-adapter.ts` |
| `/schedule` | Present as gated bundled skill | `skills/bundled/scheduleRemoteAgents.ts`, `AGENT_TRIGGERS_REMOTE` |
| `/scroll-speed` | Not found | No local command evidence |
| `/security-review` | Present | `commands/security-review.ts` |
| `/setup-bedrock`, `/setup-vertex` | Not found as commands | Provider integration likely elsewhere, no slash command evidence |
| `/simplify` | Present as bundled skill | `skills/bundled/simplify.ts` |
| `/skills` | Present | `commands/skills`, SkillTool |
| `/stats` | Present | `commands/stats` |
| `/status` | Present | `commands/status` |
| `/statusline` | Present | `commands/statusline.tsx` |
| `/stickers` | Present | `commands/stickers` |
| `/stop` | Not found as slash command | Local has `TaskStopTool`; `/tasks` can manage background tasks |
| `/tasks` | Present | `commands/tasks`, task tools |
| `/team-onboarding` | Not found | No local command/skill evidence |
| `/teleport` | Present, internal-only in registry | `commands/teleport`, `utils/teleport`, `INTERNAL_ONLY_COMMANDS` |
| `/terminal-setup` | Present | `commands/terminalSetup` |
| `/theme` | Present | `commands/theme` |
| `/tui` | Not found | No local command evidence |
| `/ultraplan` | Present/gated/internal-only | `commands/ultraplan.tsx`, `ULTRAPLAN`, `INTERNAL_ONLY_COMMANDS` |
| `/ultrareview` | Present | `commands/review.ts` exports `ultrareview` |
| `/upgrade` | Present | `commands/upgrade` |
| `/usage` | Present | `commands/usage` |
| `/usage-credits` | Older/different | Local has `/extra-usage` |
| `/verify` | Present as bundled skill | `skills/bundled/verify.ts` |
| `/vim` | Present but current docs say removed | `commands/vim` |
| `/voice` | Present/gated | `commands/voice`, `VOICE_MODE` |
| `/web-setup` | Present/gated | `commands/remote-setup` name `web-setup` |
| `/workflows` | Referenced/gated, impl missing | `commands.ts` references `commands/workflows`; folder absent |

## Built-in Tool Inventory

The interactive `#tools` route now starts with "Core Claude tool dossiers" rather than a flat inventory. Each dossier reconstructs the tool's model contract, input rules, permission logic, execution branch, result handling, context effect, pseudocode, recreate checklist, and expandable source evidence. This is intentionally a first high-impact pass over the most important tools, not a claim that all 40 local tool directories have equal dossier depth yet.

### OpenCode tools

Official docs list:

`bash`, `edit`, `write`, `read`, `grep`, `glob`, `lsp` experimental, `apply_patch`, `skill`, `todowrite`, `webfetch`, `websearch`, `question`.

Custom tools and MCP tools can extend this list.

### Codex CLI tools and surfaces

Codex does not publish the same single built-in tool table in the pages reviewed. The current official feature surface includes:

- repository read/edit/run workflows in an interactive TUI
- image inputs/screenshots
- local shell command execution with approvals/sandboxing
- diffs and review
- web search
- MCP servers
- skills
- plugins and apps/connectors
- hooks
- subagents
- AGENTS.md project instructions

### Claude local source tools

Present tool directories:

`AgentTool`, `AskUserQuestionTool`, `BashTool`, `BriefTool`, `ConfigTool`, `EnterPlanModeTool`, `EnterWorktreeTool`, `ExitPlanModeTool`, `ExitWorktreeTool`, `FileEditTool`, `FileReadTool`, `FileWriteTool`, `GlobTool`, `GrepTool`, `LSPTool`, `ListMcpResourcesTool`, `MCPTool`, `McpAuthTool`, `NotebookEditTool`, `PowerShellTool`, `REPLTool`, `ReadMcpResourceTool`, `RemoteTriggerTool`, `ScheduleCronTool`, `SendMessageTool`, `SkillTool`, `SleepTool`, `TaskCreateTool`, `TaskGetTool`, `TaskListTool`, `TaskOutputTool`, `TaskStopTool`, `TaskUpdateTool`, `TeamCreateTool`, `TeamDeleteTool`, `TodoWriteTool`, `ToolSearchTool`, `WebFetchTool`, `WebSearchTool`.

Referenced but missing implementation directories in this folder:

`WorkflowTool`, `MonitorTool`, `PushNotificationTool`, `SendUserFileTool`, `SubscribePRTool`, `WebBrowserTool`, and other feature-gated/internal tools referenced in `tools.ts`.

### Claude current documented tools

Official docs list:

`Agent`, `AskUserQuestion`, `Bash`, `CronCreate`, `CronDelete`, `CronList`, `Edit`, `EnterPlanMode`, `EnterWorktree`, `ExitPlanMode`, `ExitWorktree`, `Glob`, `Grep`, `ListMcpResourcesTool`, `LSP`, `Monitor`, `NotebookEdit`, `PowerShell`, `PushNotification`, `Read`, `ReadMcpResourceTool`, `RemoteTrigger`, `ScheduleWakeup`, `SendMessage`, `ShareOnboardingGuide`, `Skill`, `TaskCreate`, `TaskGet`, `TaskList`, `TaskOutput` deprecated, `TaskStop`, `TaskUpdate`, `TeamCreate`, `TeamDelete`, `TodoWrite` disabled by default as of v2.1.142, `ToolSearch`, `WaitForMcpServers`, `WebFetch`, `WebSearch`, `Workflow`, `Write`.

Local gaps versus current documented tools include at least `Monitor`, `PushNotification`, `ScheduleWakeup`, `ShareOnboardingGuide`, `WaitForMcpServers`, and `Workflow` as complete local implementations.

## Product-by-product Notes

### OpenCode

Strengths:
- Best provider neutrality: 75+ providers and local models.
- Clean custom command model with markdown/config commands.
- Custom agents, primary agents, subagents, and `@` invocation.
- Strong MCP support for local/remote servers and OAuth.
- Web UI and TUI attach mode.
- Simple permission model: allow, ask, deny, with granular matching.

Limitations versus Claude/Codex current docs:
- No official built-in `/goal` found.
- No official built-in `/loop`, `/schedule`, dynamic workflow, or agent-team feature found in reviewed docs.
- Built-in slash command set is smaller, though custom commands can cover many workflows.

### Codex CLI

Strengths:
- Current CLI command surface is broad and includes `/goal`, `/plan`, `/agent`, `/fork`, `/side`/`/btw`, `/plugins`, `/skills`, `/hooks`, `/mcp`, `/memories`, `/review`, `/diff`, and `/status`.
- Strong AGENTS.md guidance model with layered discovery.
- Permission profiles support filesystem and network policies.
- MCP supports STDIO and HTTP servers, bearer/OAuth auth, and shared config with IDE.
- Subagents are enabled by default but only spawned when explicitly requested.
- Open-source Rust CLI.

Limitations versus OpenCode/Claude:
- Less provider-neutral than OpenCode.
- No single official CLI built-in tool table like Claude/OpenCode docs.
- Automation surfaces exist, but Claude currently documents more end-user scheduling/remote/mobile workflows.

### Claude Code: local source here

Strengths:
- Rich command set in the snapshot.
- Deep local implementation for permissions, sandboxing, background tasks, MCP, plugins, skills, LSP, memory, worktrees, and agents.
- Useful codebase for learning architecture of a commercial coding agent.
- Contains internal/gated features such as ultraplan, teleport, remote control, team tools, cron tools, and workflow references.

Limitations:
- Not the latest.
- Some current documented features are missing locally.
- Some local code is internal-only, ant-only, or feature-gated, so presence in source does not mean it is available to every external user.

### Claude Code: current docs

Strengths:
- Broadest published feature set among the three.
- Current docs include `/goal`, `/loop`, `/schedule`, `/background`, `/batch`, `/fork`, agent view, agent teams, dynamic workflows, routines, web/desktop/mobile handoff, Chrome, computer use, and deep review workflows.
- Most detailed tool, hook, permission, sandbox, and platform documentation.

Limitations:
- Less provider-neutral than OpenCode.
- Some features depend on plan, platform, account type, or research-preview flags.

## Direct Answer to the `/goal` Example

Does `/goal` or an equivalent exist?

- Claude Code current docs: yes. `/goal` sets a completion condition and Claude continues turns until the condition is met.
- Codex CLI current docs: yes. `/goal` can set, pause, resume, view, or clear a task goal attached to the active thread.
- OpenCode current docs reviewed: no documented built-in `/goal`. You could approximate it with a custom command or an agent prompt, but there is no official built-in goal loop in the docs I found.
- Claude local source here: no local `/goal` command found. There are references to goals in prompts and logging, but not a command implementation equivalent to current docs.

## Suggested Study Path

1. Study OpenCode for provider abstraction, clean TUI/server split, custom commands, and a compact permission model.
2. Study Codex CLI docs and source for OpenAI's approach to sandbox profiles, AGENTS.md, plugins/skills/hooks, and subagent UX.
3. Study this Claude source folder for mature implementation details: command registry, dynamic feature gating, tool registry, permission modes, sandbox adapter, background tasks, plugins, skills, MCP, LSP, and agent orchestration.
4. Use Claude current docs as the feature target list for anything absent in this local source snapshot.
