October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

Six Coding-Agent CLIs Compared: Hooks, Permissions, Subagents, and MCP

A documentation-based comparison of six coding-agent CLIs, with clear limits on what is confirmed for terminal use, hooks, permission rules, subagents, and MCP.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Claude Code, OpenAI Codex CLI, Gemini CLI, GitHub Copilot CLI, Cursor CLI, and OpenCode all document MCP configuration, but their documented interfaces for hooks, permissions, and agent delegation differ. This is a selected comparison—not a census of coding-agent CLIs—and it focuses on what each product’s documentation establishes for the terminal CLI, rather than assuming that features in an editor or cloud product work the same way in a terminal. Documentation was checked on October 4, 2026; vendor documentation and repository pages can change.

Which of the six CLIs document hooks, permissions, subagents, and MCP?

The table summarizes the documented surface, not a hands-on test or a score of which tool is “best.” A documented capability does not establish identical behavior across releases or execution contexts.

As an Amazon Associate I earn from qualifying purchases.

CLI Hooks Permission controls Subagents or agents MCP configuration
Claude Code Lifecycle hooks, event matchers, and command, HTTP, MCP, prompt, or agent handlers are documented. Permission decisions and hook-mediated intervention are documented. Custom subagents and subagent lifecycle events are documented. CLI commands and JSON settings are documented.
OpenAI Codex CLI Dedicated hooks documentation. Dedicated permission documentation. Dedicated subagents documentation. Dedicated MCP documentation.
Gemini CLI Hooks are covered in the official repository documentation. Settings and policy controls are documented. Built-in and custom subagents are documented. Configuration uses an mcpServers setting.
GitHub Copilot CLI CLI material describes hooks. Approval prompts, CLI flags, and MCP tool allow/deny controls are documented. A user-authored custom subagent interface was not established in the reviewed CLI documentation. MCP tools can be allowed or denied by server and tool.
Cursor CLI Cursor documents hooks across Agent, Tab, and application lifecycle categories; not all are necessarily CLI-specific. Hooks can control actions, but a complete CLI-specific permission model was not established in the reviewed material. Cursor documents subagents; check host and CLI availability separately. Cursor documents MCP; exact CLI parity should be verified against CLI-specific documentation.
OpenCode An official hook reference was not verified in the reviewed pages. Permission rules include configurable ask and deny behavior. Agent modes and agent configuration are documented. MCP servers are documented.

These labels are not interchangeable. In particular, “hooks supported” says little about which lifecycle events can be intercepted or whether a handler can only observe an event or also block or change an action. Likewise, permission controls can mean interactive approval, tool-level rules, policy files, hook decisions, or sandbox restrictions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What do hooks let a CLI intercept?

Hooks are lifecycle-triggered handlers, but their event names, settings scopes, handler types, and effects vary by client. Claude Code’s official Hooks reference defines them as user-authored handlers that run at specified lifecycle points; it lists events including PreToolUse, PermissionRequest, PostToolUse, SubagentStart, SubagentStop, and Stop. Its documentation describes user, project, local, and managed-policy settings scopes, and handler options that include commands, HTTP, MCP tools, prompts, and agents.

#1 Best Overall
Sale
Game Programming Patterns
  • Brand New in box. The product ships with all relevant accessories

Cursor’s hook documentation describes command- and prompt-based handlers and categories for Agent, Tab, and application lifecycles, including shell, MCP, file, and subagent events. It says hooks can observe, block, or modify behavior. Because those materials span editor and cloud contexts as well as CLI-related use, verify a particular event’s availability in the terminal mode you intend to use rather than assuming all Cursor hooks run in the CLI.

Codex, Gemini CLI, and Copilot CLI also have official documentation describing hooks. The reviewed material does not establish a common event list or uniform allow/block semantics across them, so a yes/no label is not enough to choose among the three. OpenCode hook support remains unconfirmed in the reviewed official pages; that is not proof that it is unsupported.

How can you restrict what an agent runs?

Compare permission controls by what they govern and how they take effect: whether the CLI asks before an action, whether a rule can allow or deny a particular command or tool, whether organization policy applies, and whether execution is separately sandboxed. The documented interfaces across these products are not one shared permission system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Claude Code: documentation covers permission decisions and hooks that can intervene at relevant lifecycle points.
  • Codex CLI: it has dedicated permission documentation. The reviewed comparison establishes the existence of this surface, but does not establish a release-specific default approval posture or a complete list of rule syntax.
  • Gemini CLI: settings and policy controls are documented; the available materials support treating policy as part of its permission surface, not assuming it matches another CLI’s rules.
  • Copilot CLI: documentation describes interactive approval, CLI flags, and controls to allow or deny MCP tools by server and tool.
  • Cursor CLI: hooks can control actions, but the reviewed sources do not establish a complete CLI-specific permission configuration model.
  • OpenCode: permission rules can be configured to ask or deny.

Do not treat a bypass or “YOLO” mode as an ordinary approval setting: it changes the safety posture. Check the exact current CLI documentation for defaults, command and tool matching, organization-managed rules, and how any sandbox interacts with approvals before enabling unattended execution.

Which CLIs let you define or use subagents?

Claude Code, Codex CLI, Gemini CLI, Cursor, and OpenCode document agent or subagent concepts. Their configuration formats and execution hosts differ, so the label alone does not tell you whether you can author a CLI-specific agent, choose its model, limit its tools, isolate its MCP servers, or control delegation.

Claude Code documents custom subagents and lifecycle events for their start and stop. Gemini CLI documents built-in and custom subagents. Codex has dedicated subagents documentation, while Cursor documents subagents and OpenCode documents agent modes and configuration. For Cursor in particular, check that the subagent feature applies to the terminal CLI rather than only another Cursor surface.

The reviewed Copilot CLI pages did not establish a user-authored custom subagent format. That is a limit of what those pages verify, not a categorical finding that Copilot cannot delegate. MCP access is also not evidence of subagent support: a client’s ability to connect to external tools does not by itself show that users can create or configure subordinate agents.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How do you configure MCP servers in each CLI?

MCP is a shared protocol, not a guarantee that configuration files, authentication settings, tool names, or permissions transfer between clients. All six products have MCP documentation in the reviewed materials, but the specific configuration details established here are uneven.

CLI Documented configuration detail Permission detail established here
Claude Code claude mcp add-json and JSON examples for HTTP and stdio servers. Permission decisions are documented; hook-based intervention is also part of its documented lifecycle surface.
Codex CLI Dedicated MCP documentation; specific syntax and scope are not established in this comparison. Check the current MCP and permission documentation for the applicable tool rules.
Gemini CLI Settings use mcpServers; documentation covers server aliases and the mcp_-prefixed fully qualified tool naming convention. Settings and policy controls are documented; do not assume their syntax matches another client’s.
Copilot CLI MCP configuration is documented; this comparison does not establish a portable config schema. Configured server tools can be allowed or denied by server and tool.
Cursor CLI Cursor documents MCP; exact CLI configuration parity should be checked in CLI-specific documentation. Do not infer a complete CLI permission model from general Cursor hook or MCP documentation.
OpenCode MCP servers are documented; specific syntax and scope are not established in this comparison. OpenCode documents configurable ask/deny permission rules; exact MCP rule matching should be checked in current docs.

For Claude Code, the documented CLI path includes claude mcp add-json; its examples distinguish HTTP and stdio server configurations. Gemini CLI uses an mcpServers setting, and its documentation’s mcp_-prefixed fully qualified names matter when identifying tools. Copilot CLI’s documented server- and tool-level allow/deny controls are a useful distinction when you need more than a server-wide switch. For the other clients, consult their current MCP pages for exact commands, transports, environment variables, authentication, and user versus project scope rather than copying another client’s JSON.

How should you choose among them?

Start from the control you need, then verify it in the CLI and release you will actually run. If a workflow depends on blocking an action before execution, inspect the hook events and their documented blocking semantics. If it depends on least privilege, inspect approval defaults and tool-level policy, including MCP tools. If it depends on parallel delegation, look for user-authored agent configuration and explicit tool or MCP isolation. If it depends on an external service, confirm that the MCP transport and authentication method are supported in that client.

  • Use the CLI’s own documentation for its event names, config schema, scopes, and policy defaults; do not import terminology or syntax from another product.
  • Separate terminal behavior from editor, desktop, cloud-agent, API, and IDE integrations.
  • Check version-pinned or release-specific documentation when exact behavior matters; the reviewed sources include rolling vendor docs and repository pages rather than one shared release snapshot.
  • Do not rank these six categorically as “most capable” based on feature presence alone. The documentation does not provide a common scoring method or consistent release snapshot.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.