Deep dive10 min read

What is agentic coding? - In-depth analysis

SFEIR Institute

TL;DR

Agentic coding transforms software development by shifting from an autocompletion model to an autonomous orchestration model. Claude Code, Anthropic's terminal agent, executes complete tasks - code reading, multi-file editing, shell commands - without line-by-line intervention. Discover how to configure and leverage this approach, compare available tools, and choose the right model for your needs.

Agentic coding transforms software development by shifting from an autocompletion model to an autonomous orchestration model. Claude Code, Anthropic's terminal agent, executes complete tasks (code reading, multi-file editing, shell commands) without line-by-line intervention. Discover how to configure and leverage this approach, compare available tools, and choose the right model for your needs.

Agentic coding is a software development approach in which an autonomous AI agent plans, executes, and validates code modifications across an entire project. This method represents a fundamental shift from traditional autocompletion: the agent does not suggest code, it writes it, tests it, and iterates.

Claude Code can complete many refactoring tasks end-to-end with little intermediate human intervention. This advanced architecture rests on three pillars: contextual project understanding, tool execution capability, and an autonomous feedback loop. For an overview of this discipline, see the article What is agentic coding? which lays out the fundamentals.

SFEIR Institute trainings

Claude Code Training

1 day · Fundamentals

View program

AI-Augmented Developer

2 days · Intermediate

View program

How does agentic coding work compared to traditional assisted coding?

Traditional assisted coding (autocompletion, inline suggestions) works reactively. You type, the tool suggests. Agentic coding reverses this dynamic: you describe an objective, the agent breaks down the work and acts.

In practice, an agentic agent performs a complete loop:

  1. Analyze the user prompt and project context
  2. Plan the necessary steps (files to modify, commands to execute)
  3. Execute the modifications via tools (read, write, shell)
  4. Validate the result (tests, linting, compilation)
  5. Iterate if errors arise
CriterionAutocompletion (Copilot inline)Conversational agent (Cursor)Terminal agent (Claude Code)
GranularityLine/blockFileEntire project
AutonomyLowMediumHigh
Max context~8K tokens~128K tokensup to 1M tokens
Shell executionNoLimitedFull
Multi-fileNoYes (guided)Yes (autonomous)

An agentic agent typically consumes substantially more tokens than an autocompletion session, but it can significantly reduce completion time on complex multi-file tasks. To explore the best practices for usage, SFEIR Institute has compiled a detailed guide.

Key takeaway: agentic coding replaces the "suggestion by suggestion" model with an autonomous planning-execution-validation loop.

Why is Claude Code a terminal agent and not an IDE plugin?

Claude Code runs directly in your terminal via the claude command. This architectural choice is deliberate: the terminal provides access to the entire system environment: files, processes, network, Git.

Launch Claude Code with a simple command:

$ npm install -g @anthropic-ai/claude-code
$ claude

Once active, the agent has several internal tools:

  • Read: file reading with line numbers
  • Edit: exact string replacement in files
  • Bash: arbitrary shell command execution
  • Glob/Grep: file and content search
  • Write: file creation

In practice, Claude Code analyzes your Git repository, identifies the project structure, and adapts its actions. Rather than pre-indexing the repository, it searches files on demand through its ripgrep-backed Glob and Grep tools.

$ claude "Refactor the auth module to use JWT tokens"

The agent will then read the relevant files, propose a plan, execute the modifications, and run the tests. This workflow is detailed in the Installation and first launch guide which covers each step of the setup.

The context window available to Claude Code depends on the chosen model: current models (Sonnet 4.6 and Opus 4.6+) support up to a 1M-token window on most plans, enough to analyze a substantial codebase in a single session. The legacy 200K window remains the default for older models and on Bedrock, Vertex, and Foundry deployments.

Key takeaway: the terminal gives Claude Code full system access, which sets it apart from IDE plugins limited to the editor context.

How does Claude Code compare to Copilot and Cursor?

Comparing these three tools reveals distinct philosophies. Check which tool matches your workflow using the table below.

FeatureGitHub CopilotCursorClaude Code
TypeIDE pluginModified IDETerminal agent
Default modelGPT-4o / Claude 3.5GPT-4o / Claude 3.5Claude Sonnet 4.6 / Opus 4.8
Agentic modeCopilot Workspace (beta)Composer (multi-file)Native (full terminal)
PricingSubscription (see official pricing)Subscription (see official pricing)API usage (variable)
Command executionNoLimited (sandbox)Full (native shell)
Context size8K-128K128Kup to 1M
Open sourceNoNoNo (proprietary; CLAUDE.md, settings, and MCP configs are user-editable)

GitHub Copilot excels at quick autocompletion with a predictable fixed cost. Cursor offers an integrated IDE experience with its Composer mode. Claude Code provides maximum autonomy through direct shell access. For a detailed comparative analysis, see the dedicated agentic coding comparison.

In practice, developers switching from Copilot to Claude Code report significant in time spent on multi-file refactoring tasks. The trade-off: higher token consumption and an initial learning curve of 2 to 5 hours.

Key takeaway: Copilot completes, Cursor assists, Claude Code orchestrates. Choose according to the degree of autonomy desired.

What are the three models Haiku, Sonnet, and Opus, and how do you choose?

Claude's advanced architecture relies on three models with distinct characteristics. The 3 models (Haiku, Sonnet, Opus) cover the full spectrum of software development needs.

CharacteristicClaude Haiku 4.5Claude Sonnet 4.6Claude Opus 4.8
Relative speedFastestBalancedMost deliberate
Context window200K1M1M
Primary use caseQuick tasks, triageDaily developmentComplex reasoning
Coding benchmark (SWE-bench Verified)SolidStrongState-of-the-art

For current per-token pricing, always see the official pricing, as rates evolve with each model release.

Configure the model in Claude Code with the /model command:

$ claude --model claude-sonnet-4-6
# or switch the model inside an interactive session:
# /model claude-opus-4-8

Haiku is the fastest model. Use it for bug triage, quick code searches, and classification tasks. It is not designed for complex refactorings.

Sonnet represents the best cost-performance trade-off for the majority of development tasks. With strong coding-benchmark performance, it handles multi-file modifications, test generation, and documentation.

Opus delivers state-of-the-art coding-benchmark performance and excels at architectural reasoning. Reserve it for tasks requiring deep understanding: framework migrations, system design, complex bug resolution. You will find concrete use cases in the article Agentic coding use cases.

Key takeaway: Haiku for speed, Sonnet for daily work, Opus for complexity. The model choice directly impacts cost and result quality.

How much does Claude Code cost and how do the pricing plans work?

Claude Code offers two consumption modes: the Claude Pro/Max subscription and direct API usage. Check which pricing model fits your usage.

The Claude Max subscription includes a high usage quota for Claude Code with Sonnet 4.6, and the higher Max tier unlocks a larger quota and priority access to Opus 4.8. API usage is billed per token consumed, with no subscription. For plan figures, see the official pricing.

In practice, a focused refactoring session can consume a large number of tokens, and the cost scales with the model you select: Opus sessions cost noticeably more than the equivalent work on Sonnet. These figures vary with input, output, and cached tokens, so treat any estimate as rough and confirm current rates on the official pricing.

# Inside an interactive Claude Code session, check consumption:
/cost
# Example output: Session: $1.23 | Total today: $4.56
PlanPriceIncluded modelUsage limitsIdeal for
ProSee official pricingSonnet 4.6Dynamic, lowest tierOccasional use
Max 5xSee official pricingSonnet + OpusDynamic, higher tierActive development
Max 20xSee official pricingOpus priorityDynamic, highest tierIntensive use
Direct APIVariableAll modelsPay per tokenTeams, CI/CD

Usage limits on the subscription plans are dynamic rather than a fixed number of messages, so consult the official pricing for current details. many using Claude Code daily opt for the Max 5x plan. To manage consumption, configure spending limits in your configuration file and follow the recommendations in the context optimization guide.

Key takeaway: cost depends on the chosen model and token volume. Monitor your consumption with /cost and match the model to the task complexity.

How does Claude Code's internal architecture work?

Claude Code's architecture relies on an agent-tool loop that executes a perception-action-reflection cycle. Examine the internal flow to understand the tool's subtle behaviors.

Each loop turn consumes an API call. A simple task such as renaming a variable typically needs only a handful of turns, while a complex task such as a database migration can require many more as the agent reads, edits, and validates across files.

The persistent memory mechanism via CLAUDE.md files allows the agent to retain instructions between sessions. Create a CLAUDE.md file at the root of your project:

# CLAUDE.md
- This project uses strict TypeScript
- Tests are in /tests with Vitest
- Use absolute imports via @/

This memory system is documented in detail in the CLAUDE.md optimization guide. The agent automatically loads this file at the start of each session, which can reduce the number of required turns.

In practice, context management is the main limiting factor. A larger context window lets Claude Code hold more files in view at once, but every codebase eventually exceeds what fits. Beyond that point, the agent uses an automatic compression mechanism for previous messages. The context management guide explores this mechanism in depth.

Key takeaway: Claude Code operates in an agent-tool loop with automatic context compression. The CLAUDE.md file is your primary lever for optimizing each session.

When should you NOT use agentic coding?

Agentic coding is not suited to every situation. Evaluate these edge cases before delegating a task to an agent.

Cases where traditional autocompletion remains superior:

  • Single-line modifications (renaming a local variable)
  • Writing exploratory code in "draft" mode
  • Rapid prototyping in a Jupyter notebook
  • Sensitive files (credentials, production configurations)

Cases where human intervention remains necessary:

  • Strategic architectural decisions (framework choice, database structure)
  • Code involving regulatory constraints (GDPR, PCI-DSS)
  • Critical performance optimizations requiring profiling
  • Security review on cryptographic code

Decision tree:

If the task touches 1 single file and < 10 lines
 -> Use autocompletion (Copilot)
If the task touches 2-5 files with clear context
 -> Use an IDE agent (Cursor Composer)
If the task touches 5+ files or requires shell commands
 -> Use Claude Code
If the task involves sensitive data or irreversible decisions
 -> Keep full human control

Agentic agents are markedly more reliable on routine, well-scoped refactors than on tasks that demand deep domain or business understanding, where the likelihood of subtle mistakes climbs. See the essential slash commands to learn how to guide the agent and reduce this error rate.

Key takeaway: agentic coding excels at repetitive and multi-file tasks, but leave architectural decisions and sensitive code under human control.

How do you get started with agentic coding?

Get started by following these concrete steps to integrate Claude Code into your daily workflow.

# Step 1: Installation
$ npm install -g @anthropic-ai/claude-code

# Step 2: Authentication (or just run `claude`, which prompts you to log in on first use)
$ claude auth login

# Step 3: First launch in your project
$ cd my-project && claude

# Step 4: First task
> Analyze this project and generate a suitable CLAUDE.md

Configure your environment by creating a project memory file. Find the complete details in the Your first conversations guide which covers effective prompt patterns.

Here is how to structure your adoption in three phases:

  1. Week 1: use Claude Code for documentation and unit tests
  2. Week 2: delegate refactorings and bug fixes
  3. Week 3: integrate the agent into your Git workflow (commits, PR reviews)

SFEIR Institute offers the Claude Code one-day training to master the fundamentals: installation, CLAUDE.md configuration, prompt patterns, and context management. To go further, the AI-Augmented Developer two-day training covers the full integration of agentic tools into your development chain, with hands-on labs on real projects.

Developers already familiar with these tools can deepen their skills with the AI-Augmented Developer - Advanced one-day training, focused on advanced use cases and workflow optimization.

Key takeaway: start with low-risk tasks (tests, documentation), then gradually increase complexity as you master effective prompt patterns.

Recent articles about Claude

Claude Code Training

This topic is covered in Module 1 of our Claude Code training

Introduction to the Augmented Developer Mindset

1-day training • 60% hands-on labs • Expert instructors

View full program