Practical agent comparison

Claude Code vs Gemini CLI

Both products document hierarchical project guidance, coding tools, filesystem changes, shell execution, and permission controls. Claude Code uses scoped CLAUDE.md files and repository auto memory. Gemini CLI uses hierarchical GEMINI.md context and documents planning and web tools; the reviewed evidence does not establish comparable persistent memory. Their confirmation, sandbox, and context-assembly mechanisms differ, so preserve the destination product's control model when migrating workflows.

Reviewed
Products
Claude Code · Gemini CLI
Decision criteria
9 reviewed questions

Comparison orientation

Four reviewed dimensions at a glance

Each dimension links to its detailed evidence row. State labels describe the selected evidence.

Who this comparison is for

How do Claude Code and Gemini CLI assemble documented instructions and controls?

Developers and engineering teams comparing multi-surface Claude Code workflows with terminal-based Gemini CLI automation.

Evidence-bounded scope

Product, surface, and model context

These summaries combine only the scope stated in the reviewed answers. Each criterion keeps its narrower limits.

Claude Code

Surfaces represented
Claude Code terminal CLI · Claude Code IDE integrations
Model context represented
Not established

Gemini CLI

Surfaces represented
Gemini CLI
Model context represented
Not established

Practical behavior comparison

What the selected evidence establishes

“Not established” records an evidence gap. It does not mean the product lacks the capability.

Behavior Intelligence comparison of Claude Code and Gemini CLI
CriterionClaude CodeGemini CLIInterpretation
Repository / project instructions Repository guidance must be placed in the target agent's documented instruction hierarchy. Documented

Scoped CLAUDE.md hierarchy

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model
Not established
Config/version
Not established
Documented

Hierarchical GEMINI.md context

Surface
Gemini CLI
Model
Not established
Config/version
Not established
Read practical implication
Memory / persistent context Durable workflow context should not be assumed to persist across agent environments. Documented

Repository-scoped auto memory

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model
Not established
Config/version
Not established
Not established

Persistent memory semantics not established

Surface
Not established
Model
Not established
Config/version
Not established
Review the documented evidence gap
Read practical implication
Planning / work decomposition Planning assumptions shape how teams structure, review, and resume multi-step work. Documented

Plan mode before source edits

Surface
Claude Code terminal CLI
Model
Not established
Config/version
Current product documentation consulted 2026-09-14; enabled mode, settings, and deployment still determine availability.
Documented

Planning appears in documented tools

Surface
Gemini CLI
Model
Not established
Config/version
Not established
Read practical implication
Tools / tool calling A portable workflow must use only the tools established by the selected evidence. Documented

Read, edit, execute, and external tools

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model
Not established
Config/version
Permission rules and modes can constrain tool execution.
Documented

Filesystem, execution, planning, MCP, and web

Surface
Gemini CLI
Model
Not established
Config/version
Enabled tools and security posture can vary with configuration.
Read practical implication
Filesystem / file modification Repository reads and mutations require the correct workspace and review boundary. Documented

Reads and edits codebase files

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model
Not established
Config/version
Permission rules distinguish read-only and mutating actions.
Documented

Filesystem tools with confirmation for mutation

Surface
Gemini CLI
Model
Not established
Config/version
Sandbox and trusted-folder settings can change the execution boundary.
Read practical implication
Shell / terminal execution Command-heavy automation depends on the target harness's execution controls. Documented

Runs commands through codebase tools

Surface
Claude Code terminal CLI
Model
Not established
Config/version
Permission rules and modes determine when command execution is allowed or asks for approval.
Documented

Shell tools with confirmation and isolation

Surface
Gemini CLI
Model
Not established
Config/version
Sandboxing and trusted-folder settings can constrain execution.
Read practical implication
Browsing / network access Current external information cannot be assumed available when browsing scope is unestablished. Documented

WebSearch and WebFetch

Surface
Claude Code terminal CLI
Model
Not established
Config/version
Current product documentation consulted 2026-09-14; enabled mode, settings, and deployment still determine availability.
Documented

Web tools in official tool reference

Surface
Gemini CLI
Model
Not established
Config/version
Availability depends on enabled tools and security configuration.
Read practical implication
Approvals / permissions Consent, confirmation, and isolation rules determine which delegated actions can proceed. Documented

Deny, ask, allow, and permission modes

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model
Not established
Config/version
Rules can be managed at different settings scopes and by the client environment.
Documented

Confirmation, sandbox, and trusted folders

Surface
Gemini CLI
Model
Not established
Config/version
Security policy and isolation settings shape the actual boundary.
Read practical implication
Context scope / inheritance Instructions and tools remain dependable only when their surface, model, and configuration boundaries are preserved. Documented

Managed, user, project, local, and memory scopes

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model
Not established
Config/version
The reviewed evidence covers terminal and IDE-oriented product surfaces with a selectable Claude model.
Documented

Global, workspace, just-in-time, and dynamic context

Surface
Gemini CLI
Model
Not established
Config/version
The product uses a configurable Gemini model and can fully replace its built-in system prompt.
Read practical implication

Criterion-by-criterion interpretation

Scope, limitations, and evidence

Behavior Intelligence supplies the factual answers. Editorial implications remain separate.

01

How do AI agents use repository or project instructions?

Open evidence across six products

Why it matters. Repository guidance must be placed in the target agent's documented instruction hierarchy.

Claude Code

Documented
Direct factual answer

Claude Code documents managed, user, project, and local CLAUDE.md instruction scopes for coding-agent work.

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model context
Not established
Configuration / version
Not established
Limits and uncertainty
  • The complete default base system prompt is not established.

Gemini CLI

Documented
Direct factual answer

Gemini CLI documents global, workspace, and just-in-time GEMINI.md files as hierarchical project and task context.

Surface
Gemini CLI
Model context
Not established
Configuration / version
Not established
Limits and uncertainty
  • The context hierarchy is distinct from the replaceable built-in system prompt.
02

Does the product document memory or persistent context?

Open evidence across six products

Why it matters. Durable workflow context should not be assumed to persist across agent environments.

Claude Code

Documented
Direct factual answer

Claude Code documents repository-scoped auto memory that stores selected learnings separately from human-authored CLAUDE.md instructions.

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model context
Not established
Configuration / version
Not established
Limits and uncertainty
  • Auto memory is context, not hard policy enforcement.

Gemini CLI

Not established
Direct factual answer

The selected Gemini CLI tools reference names memory among its categories, but does not establish enough persistence or scope behavior for this question.

Surface
Not established
Model context
Not established
Configuration / version
Not established
Limits and uncertainty
  • A tool category alone is not treated as proof of cross-session persistence.

No source link is attached because the reviewed evidence does not establish this answer.

03

How is planning or work decomposition documented?

Open evidence across six products

Why it matters. Planning assumptions shape how teams structure, review, and resume multi-step work.

Claude Code

Documented
Direct factual answer

Plan mode researches and proposes changes before source edits. It can run exploratory shell commands and write a plan. Outside sessions with bypass permissions available, source edits remain blocked until plan approval. Command review depends on mode, settings, and version; approval exits planning into the selected execution mode. CLI evidence is not a universal read-only sandbox claim.

Surface
Claude Code terminal CLI
Model context
Not established
Configuration / version
Current product documentation consulted 2026-09-14; enabled mode, settings, and deployment still determine availability.
Limits and uncertainty
  • This claim does not update the dated prompt snapshot or establish every runtime configuration.

Gemini CLI

Documented
Direct factual answer

The selected Gemini CLI tools reference includes planning among the documented tool categories available to the CLI.

Surface
Gemini CLI
Model context
Not established
Configuration / version
Not established
Limits and uncertainty
  • The selected evidence does not establish one fixed planning sequence across configurations.
04

What tools or tool-calling capabilities are documented?

Open evidence across six products

Why it matters. A portable workflow must use only the tools established by the selected evidence.

Claude Code

Documented
Direct factual answer

Claude Code documents tools for reading code, editing files, running commands, and connecting to external tools.

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model context
Not established
Configuration / version
Permission rules and modes can constrain tool execution.
Limits and uncertainty
  • The selected evidence does not establish that every deployment exposes every external tool.

Gemini CLI

Documented
Direct factual answer

Gemini CLI's selected official reference covers filesystem, execution, planning, memory, MCP, and web tool categories.

Surface
Gemini CLI
Model context
Not established
Configuration / version
Enabled tools and security posture can vary with configuration.
Limits and uncertainty
  • The selected evidence does not establish one immutable tool set.
05

Can the agent read or modify files?

Open evidence across six products

Why it matters. Repository reads and mutations require the correct workspace and review boundary.

Claude Code

Documented
Direct factual answer

Claude Code's official overview says the product reads code, edits files, and runs commands.

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model context
Not established
Configuration / version
Permission rules distinguish read-only and mutating actions.
Limits and uncertainty
  • Access remains bounded by the client environment and configured permissions.

Gemini CLI

Documented
Direct factual answer

Gemini CLI documents filesystem tools, with mutating file operations subject to confirmation and configured security boundaries.

Surface
Gemini CLI
Model context
Not established
Configuration / version
Sandbox and trusted-folder settings can change the execution boundary.
Limits and uncertainty
  • Tool availability varies by configuration and version.
06

Can the agent execute shell or terminal commands?

Open evidence across six products

Why it matters. Command-heavy automation depends on the target harness's execution controls.

Claude Code

Documented
Direct factual answer

Claude Code's official overview documents command execution as part of codebase operations.

Surface
Claude Code terminal CLI
Model context
Not established
Configuration / version
Permission rules and modes determine when command execution is allowed or asks for approval.
Limits and uncertainty
  • The exact command environment is deployment-specific.

Gemini CLI

Documented
Direct factual answer

Gemini CLI documents shell execution tools whose requests pass through confirmation and configured security policies.

Surface
Gemini CLI
Model context
Not established
Configuration / version
Sandboxing and trusted-folder settings can constrain execution.
Limits and uncertainty
  • The enabled tool set is configuration-dependent.
07

Can the product browse or access web and network resources?

Open evidence across six products

Why it matters. Current external information cannot be assumed available when browsing scope is unestablished.

Claude Code

Documented
Direct factual answer

WebSearch returns search titles and URLs; WebFetch retrieves and processes a page, with lossy summarization and possible truncation. Tool/domain rules and provider support apply. Amazon Bedrock does not expose the server-side search tool; an Azure-hosted Foundry deployment does not support it. Web tools do not establish arbitrary network access.

Surface
Claude Code terminal CLI
Model context
Not established
Configuration / version
Current product documentation consulted 2026-09-14; enabled mode, settings, and deployment still determine availability.
Limits and uncertainty
  • This claim does not update the dated prompt snapshot or establish every runtime configuration.

Gemini CLI

Documented
Direct factual answer

Gemini CLI's selected official tools reference includes web capabilities among the available tool categories.

Surface
Gemini CLI
Model context
Not established
Configuration / version
Availability depends on enabled tools and security configuration.
Limits and uncertainty
  • The selected evidence does not establish unrestricted network access.
08

What approval or permission controls are documented?

Open evidence across six products

Why it matters. Consent, confirmation, and isolation rules determine which delegated actions can proceed.

Claude Code

Documented
Direct factual answer

Claude Code documents deny, ask, and allow rules with precedence, plus permission modes that constrain tool execution.

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model context
Not established
Configuration / version
Rules can be managed at different settings scopes and by the client environment.
Limits and uncertainty
  • The selected evidence does not establish every deployment policy.

Gemini CLI

Documented
Direct factual answer

Gemini CLI documents confirmation for mutating file and shell tools, with sandboxing and trusted-folder boundaries.

Surface
Gemini CLI
Model context
Not established
Configuration / version
Security policy and isolation settings shape the actual boundary.
Limits and uncertainty
  • The selected evidence does not establish every enterprise policy.
09

How is context scoped or inherited across products and agents?

Open evidence across six products

Why it matters. Instructions and tools remain dependable only when their surface, model, and configuration boundaries are preserved.

Claude Code

Documented
Direct factual answer

Claude Code documents managed, user, project, and local CLAUDE.md scopes plus separate repository-scoped auto memory.

Surface
Claude Code terminal CLI · Claude Code IDE integrations
Model context
Not established
Configuration / version
The reviewed evidence covers terminal and IDE-oriented product surfaces with a selectable Claude model.
Limits and uncertainty
  • The complete default system prompt is not established.

Gemini CLI

Documented
Direct factual answer

Gemini CLI documents global, workspace, and just-in-time GEMINI.md context plus dynamic injection of enabled skills, subagents, and tools.

Surface
Gemini CLI
Model context
Not established
Configuration / version
The product uses a configurable Gemini model and can fully replace its built-in system prompt.
Limits and uncertainty
  • No single immutable runtime assembly is claimed.

Workflow guidance

Migration considerations

These implications follow from the reviewed criteria. They do not express a product preference.

Example: move repository guidance without copying learned state

Separate the policy to preserve from context that needs a fresh review before a Claude Code workflow moves to Gemini CLI.

  1. Suppose project CLAUDE.md says to validate generated API clients, user guidance prefers concise responses, and Claude Code auto memory contains a note about an old generation command. Treat these as three different inputs.
  2. Put the team validation requirement in the workspace GEMINI.md context and the personal preference in its documented global context. Use the project’s actual generation command; do not promote an auto-memory note to team policy without checking it.
  3. Inspect Gemini CLI just-in-time context and enabled tools, skills, and subagents as well as GEMINI.md. Its dynamic prompt inputs are not reproduced by copying CLAUDE.md. A configured full system-prompt replacement also needs separate inspection.
  4. Require a proposed file list and validation plan before approving edits. Both products document planning, but the selected Gemini tool evidence does not prove Claude Code’s Plan-mode approval flow applies there. Set Gemini confirmation and isolation controls independently.
  5. Handoff condition: the destination identifies the intended generation command and team rule, and the operator verifies its execution boundary. Keep the old memory note as an unresolved handoff question until checked; no equivalent Gemini automatic-memory behavior is established here.

Make planning and persistence requirements explicit

Both products establish planning, but the selected Gemini CLI record does not establish an equivalent to Claude Code auto memory. Carry task state explicitly and review the destination execution controls before work resumes.

Recheck network-dependent steps

A web-dependent step can fit either product, but the target must expose the required tools. On Claude Code, verify provider support for WebSearch and domain permission for WebFetch; on Gemini CLI inspect enabled web tools and security settings.

Comparison-specific evidence

Differences in available evidence

Claude Code and Gemini CLI combine model context, project instructions, tools, and harness controls in different ways. Their official documentation differs most clearly in base-prompt handling, dynamic assembly, and project-context scope. The analysis below adds prompt and product context to the shared behavior criteria.

  1. 01

    Gemini CLI documents prompt export and replacement

    Gemini CLI exposes workflows to export its current built-in prompt and completely replace it. No equivalent full-prompt workflow is established for Claude Code in the selected sources.

  2. 02

    Both document hierarchical project context

    Claude Code uses scoped CLAUDE.md files; Gemini CLI uses global, workspace, and just-in-time GEMINI.md context.

  3. 03

    Dynamic context works differently

    Claude Code documents repository auto memory. Gemini CLI documents dynamic substitution of skills, subagents, and enabled tools into custom prompts.

Source-specific detail

Product and prompt evidence

These criteria cover prompt visibility, product identity, and other evidence specific to this comparison.

Claude Code and Gemini CLI source-specific evidence comparison
CriterionClaude CodeGemini CLI
Product and model roleEditorial interpretation. Both are coding-agent harnesses with a selectable or configurable model rather than one product-equals-model identity. documented

Claude Code spans terminal, IDE, desktop, and web surfaces with a separately selected Claude model.

documented

Gemini CLI is an open-source terminal agent whose configured Gemini model is separate from its instruction assembly.

Base-prompt handlingEditorial interpretation. Official Gemini CLI documentation exposes a prompt workflow that the selected Claude Code documentation does not establish. not established

The selected official sources do not publish or expose a complete default Claude Code system prompt.

documented

GEMINI_WRITE_SYSTEM_MD can export the current built-in prompt, while GEMINI_SYSTEM_MD can replace it completely.

Project instructionsEditorial interpretation. Both products document hierarchical instruction files, but the filenames and scope models differ. documented

CLAUDE.md instructions can be managed, user-scoped, project-scoped, or local.

documented

GEMINI.md context can load globally, from a workspace hierarchy, and just in time from relevant directories.

Dynamic instruction assemblyEditorial interpretation. Gemini CLI's selected docs are more explicit about named dynamic substitutions; Claude Code's selected docs focus on scoped files and memory. documented

Claude Code assembles scoped CLAUDE.md context and repository memory, but this source set does not establish an equivalent named substitution template.

documented

Custom prompts can substitute available skills, subagents, and enabled tool names, making the resolved prompt configuration-dependent.

Tools and permission boundariesEditorial interpretation. Both harnesses mediate agent actions outside model text, with different documented rule vocabularies. documented

Claude Code documents code, file, command, and external-tool operations plus deny, ask, and allow permission rules.

documented

Gemini CLI documents filesystem, execution, planning, memory, MCP, and web tools with confirmation and sandbox boundaries.

Persistent memoryEditorial interpretation. Claude Code documents a repository-scoped auto-memory store. The selected Gemini CLI source names a memory tool but does not establish an equivalent automatic store. documented

Auto memory stores selected learnings separately from human-authored CLAUDE.md instructions.

not established

The selected Gemini CLI tools reference includes memory capability, but does not establish an equivalent repository auto-memory mechanism.

Using the evidence

How to read this evidence

Choose the evidence boundary before comparing prompts

Gemini CLI supports explicit export and replacement claims; Claude Code's selected sources support architecture analysis without a complete default-prompt claim.

Map repository guidance by scope

Both products support persistent project context, but CLAUDE.md and GEMINI.md have different documented hierarchies and should not be treated as interchangeable names.

Primary-source trail

Sources used in this comparison

Each source links to its product evidence, with provenance and publication limits preserved.

Claude Code

Gemini CLI

Read the comparison and publication methodology

Deeper cross-agent context

Open the six-product answer for broader evidence and scope.

Continue comparing

Available pages

Search Promptcred

Type to search available pages.