AI Bytes Learning
Claude Code Fundamentals
beginner
Agentic Coding Basics

Claude Code Fundamentals

Learn to install the Claude Code CLI and execute your first file-editing session using the Read/Edit/Write/Bash loop.

⏱ 15 minIntermediate
After this lesson
Install the Claude Code CLI
Execute the Read/Edit/Write/Bash loop
Manage initial file-editing sessions
15min
min
to complete
4
checks
built in
100
xp
on complete
2
level
Intermediate
Learning Objective
By the end of this lesson you will be able to initiate a Claude Code session to perform autonomous file edits. This capability allows you to offload repetitive coding tasks to an agent that understands your actual local files. You will build a mental model of the agentic loop as a persistent, file-aware process rather than a static chat window.

The Agentic Coding Loop

Claude Code operates through a continuous feedback loop known as the Read/Edit/Write/Bash cycle. Unlike a standard LLM chat window, this agent is tethered to your local filesystem and terminal.

02

The agent reads your project files to build context, edits the code to implement changes, writes those changes to disk, and uses the Bash tool to verify the result. This creates a self-correcting workflow where the agent can run tests and fix its own errors.

03

For example, if you ask it to fix a broken import, the agent reads the file, edits the import statement, writes the file, and then runs the test command to confirm it works. If the test fails, the agent immediately reads the error output and attempts another edit.

04

This capability transforms your terminal from a passive execution window into an active workspace. You no longer manually copy-paste code; you guide the agent as it manages the mechanical steps of your development process.

Fill the Prompt

Directing Your First Task

+25 XP

Complete this prompt to give the agent a clear, scoped coding task.

Context

You have a file named 'app.py' that needs a new function to calculate the average of a list, but you want to ensure the agent doesn't change existing imports.

⌘ Enter to submit
Claude Code does not just generate text; it reads your local filesystem and executes commands to modify your code directly.
8ss

The viewer sees the agent reading files and proposing edits in a real terminal. This demonstrates the practical reality of agentic coding versus simple chat.

Visual Insight · AI Video

The First Execution

Observing the agentic loop in a live terminal environment.

Duration: 8ssAuto-Playing

Before we begin

Why does the same prompt produce wildly different outputs in an agentic environment compared to a standard chat window? The answer lies in the persistent file-access loop, not the model weights themselves.

Before you continue

What do you predict happens when Claude Code encounters an error while executing a command?

The Cause-Effect Loop

Static Chat
01Ask question
02Receive text
03Copy-paste code
04Run manually
05Execution Loop
Manual intervention required
vs
Agentic Loop
01Define goal
02Agent reads files
03Agent edits code
04Agent runs bash
05Execution Loop
Autonomous progress made

The diagram reveals how the agentic loop removes the manual steps between generating code and verifying it. By closing the gap between editing and executing, the agent acts as an extension of your own development process.

Instructor Insight
🔍
Context is King

The agent is only as effective as the context you provide. Always define the scope of your task before starting the loop.

🛡️
Use Checkpoints

Before running risky terminal commands, use checkpoints to ensure you can revert the state if the agent makes an unexpected edit.

Bash as Feedback

Treat terminal output as the primary signal for the agent. If a command fails, the agent will see it and adjust its next edit accordingly.

Confidence check

How confident do you feel in monitoring the agent's actions during the edit-run loop?

Test Your Understanding

1 of 3
What is the primary function of the Bash tool in the Claude Code loop?
Key Takeaways

If you remember only three things…

1

Agentic Loops

Claude Code uses a Read/Edit/Write/Bash cycle to automate development tasks directly on your local system.

2

Human Oversight

Always review diffs before finalizing changes to ensure the agent's work aligns with your project intent.

3

Terminal as Feedback

The terminal is the agent's primary source of feedback; failing commands help the agent self-correct.

4

Scoped Directives

Clear, scoped prompts prevent the agent from wandering outside the intended task boundaries.

Term Glossary

4 verified concepts
Lesson complete

From Manual Coder to Agent Director

You now perceive coding not as an isolated typing task, but as a directed agentic process. Your development workflow has moved from manual execution to active oversight of a file-aware system.

You can now initialize a Claude Code session to manage file edits.
You can now interpret terminal feedback as an agent's primary source of self-correction.
You can now manage code quality by reviewing diffs within the agentic loop.

This is where coding stops being a manual pursuit and begins to function as an autonomous, iterative architecture.

In the next lesson, you will learn to use plan mode to review agent intent before changes are applied.

Next Lesson
Visual Summary

Audio lesson recap

A concise audio summary of this lesson — great for reinforcing key concepts on the go.

Audio discussion · Sterling & Vivienne15 exchanges · ElevenLabs

Hear it discussed

About three minutes on the ideas in this lesson

S

Sterling

AI tutor

V

Vivienne

Sceptical challenger

Press play to start the discussion…

Full transcript · click any line to jump

S
Ask Sterling about this lesson

Ask anything about Claude Code Fundamentals. Sterling will answer — concisely, and with his customary level of patience.