Claude Code Overview & Core Capabilities
What Claude Code is and how it works as an agentic coding tool.
Learning Objectives
- Explain Claude Code's core capabilities
- Understand the agentic coding loop
- Navigate Claude Code's tool and permission system
Claude Code Overview & Core Capabilities
Claude Code is Anthropic's official agentic coding tool — a command-line interface that gives Claude direct access to your development environment. Unlike chat-based assistants where you copy and paste code back and forth, Claude Code operates as a true coding agent: it reads your files, edits your code, runs terminal commands, and iterates on results in an autonomous loop. Understanding Claude Code's architecture and capabilities is essential for the CCA-F exam.
What Is Claude Code?
Claude Code is a CLI-based agentic coding tool that runs in your terminal. When you launch it, Claude gains the ability to:
- Read and search your codebase: Claude can open files, search for patterns with grep, and navigate directory structures to understand your project.
- Edit files directly: Rather than suggesting changes, Claude writes edits directly to your files using precise string replacement operations.
- Execute terminal commands: Claude can run build commands, test suites, linters, and any other CLI tool available in your environment.
- Manage git operations: Claude can create commits, switch branches, and manage your version control workflow.
- Interact with external services: Through MCP (Model Context Protocol) servers, Claude can connect to databases, APIs, and other development tools.
Installing and Launching Claude Code
Claude Code is installed via npm and requires Node.js 18 or later:
npm install -g @anthropic-ai/claude-code
# Launch Claude Code in your project directory
cd my-project
claudeWhen launched, Claude Code starts an interactive session in your terminal. You can also run it in non-interactive mode for CI/CD and scripting use cases using the --print flag, which is covered in detail in Lesson 3.5.
The Agentic Coding Loop
At its core, Claude Code operates in an agentic loop — the same pattern described in Domain 1. Understanding this loop is critical for the exam:
- Step 1 - Receive task: You provide a natural language instruction describing what you want Claude to do.
- Step 2 - Plan and reason: Claude analyzes the request, reads relevant files, and determines what steps are needed.
- Step 3 - Execute tools: Claude calls tools (file reads, edits, terminal commands) to make progress toward the goal.
- Step 4 - Observe results: Claude examines the output of each tool call — did the build succeed? Did the test pass? Was the file written correctly?
- Step 5 - Iterate or complete: Based on the results, Claude either takes additional actions to fix issues or declares the task complete.
This loop continues autonomously until the task is complete or Claude needs human input. The key insight is that Claude Code is not just executing a fixed script — it dynamically decides what to do next based on what it observes.
Core Tool System
Claude Code has access to a set of built-in tools that it uses to interact with your development environment. Understanding these tools is important for both configuring permissions and for exam questions about what Claude Code can and cannot do.
File Tools
- Read: Reads file contents from disk. Supports reading specific line ranges for large files.
- Edit: Performs exact string replacements in files. This is the primary mechanism for code changes — Claude specifies the old text and the new text.
- Write: Creates new files or completely overwrites existing ones. Used for new file creation rather than editing existing files.
- Glob: Fast file pattern matching using glob syntax (e.g.,
**/*.ts). Used to discover files by name pattern. - Grep: Content search powered by ripgrep. Searches file contents using regex patterns.
Execution Tools
- Bash: Executes terminal commands. This is the most powerful tool — it can run any command available in your shell, including build tools, test runners, package managers, and git.
Agent Tools
- Agent (subagent): Spawns a sub-agent for complex, independent tasks. The sub-agent gets its own context window and can use the same tools. Useful for parallel exploration or isolated research tasks.
The Permission System
Claude Code implements a layered permission system to balance autonomy with safety. Every tool call falls into one of two categories:
Read-Only Tools (No Approval Required)
These tools are considered safe because they do not modify your environment:
- Read, Glob, Grep — file reading and searching
- Agent — spawning sub-agents (the sub-agent itself requests permissions for its tools)
Write Tools (Approval Required)
These tools can modify your environment and require explicit permission:
- Edit, Write — modifying or creating files
- Bash — executing terminal commands
- MCP tools — any tool provided by an MCP server
When Claude wants to use a write tool, it presents the action to you for approval. You can:
- Allow once: Permit this specific action.
- Allow for session: Permit all future uses of this tool in the current session.
- Allow permanently: Add the permission to your settings so it persists across sessions.
- Deny: Reject the action.
# Example: Claude requests permission to run a bash command
# The prompt shows what command will be run:
#
# Claude wants to run: npm test
# Allow? [y]es / [n]o / [a]lways for session / [p]ermanentContext Window Management
Claude Code operates within a context window, just like any Claude API call. However, since agentic sessions involve many tool calls, file reads, and command outputs, the context can fill up quickly. Claude Code manages this through several mechanisms:
- Automatic compaction: When the context window is nearly full, Claude Code automatically summarizes the conversation so far, preserving key context while freeing space for additional tool calls.
- Selective file reading: Rather than reading entire files, Claude reads specific line ranges when it knows which section it needs.
- Efficient search: Glob and Grep return targeted results rather than dumping entire file contents into the context.
The /compact Command
You can manually trigger context compaction using the /compact slash command. This is useful when you notice the conversation getting long and want to preserve context budget for the remaining work:
# Manually compact the conversation
/compact
# Compact with specific instructions about what to preserve
/compact focus on the database migration workSession Management
Claude Code supports session persistence, allowing you to resume work across terminal sessions:
# Resume the most recent session
claude --resume
# List recent sessions
claude --sessions
# Resume a specific session by ID
claude --resume SESSION_IDSessions are stored locally and include the full conversation history, making it possible to continue complex multi-step tasks across work sessions.
Multi-Turn Interaction Patterns
In practice, working with Claude Code involves a series of exchanges. Understanding effective interaction patterns is important for the exam:
- Broad-to-narrow: Start with a high-level request, then refine based on what Claude produces. For example: "Refactor the auth module" followed by "Actually, keep the existing session handling but extract the JWT logic."
- Verify-then-extend: Ask Claude to implement something, verify it works (Claude runs tests), then ask for the next piece.
- Plan-then-execute: Ask Claude to describe its plan before making changes. This is especially useful for large refactors where you want to review the approach first.
Exam-Relevant Concepts Summary
- Claude Code is a CLI tool installed via npm, not an IDE extension or web app.
- The agentic loop: receive task, plan, execute tools, observe results, iterate.
- Read-only tools (Read, Glob, Grep) do not require permission; write tools (Edit, Write, Bash) do.
- Context compaction happens automatically and can be triggered manually with
/compact. - Sessions can be resumed with
claude --resume. - Sub-agents provide isolated context windows for parallel or independent tasks.
- MCP servers extend Claude Code's tool set with external integrations.