Engineering Journal

Claude Code 101: What I Learned (Part 1) — From AI Coding to Development Workflows

My notes and takeaways from Anthropic Claude Academy's Claude Code 101, covering the agentic loop, context management, permission controls, and how Claude Code fits into everyday software development.


In my previous post, I shared what I learned from Claude 101. I’ve now finished Claude Code 101, a course made up of 12 lessons.

I had already used Claude Code and other AI coding tools, so I was familiar with asking AI to read code, make changes, or help track down bugs.

I expected the course to focus mostly on how to use the tool. Instead, quite a few lessons explained how Claude Code works behind the scenes and how to fit it into a day-to-day software development workflow.

There was a lot to cover, so I decided to split my notes into two posts.

Part 1 covers how Claude Code works, context management, permission modes, and the development workflow. Part 2 will cover CLAUDE.md, Skills, Subagents, MCP, and Hooks.

Agentic Loop: How Claude Code Completes Tasks

Claude Code works as an AI agent.

An AI agent is software that can interact with its environment and take actions to accomplish a goal. It can use tools, access external services, or work with other AI agents.

That’s one of the main differences between Claude Code and a typical chat-based AI assistant.

With a chat assistant, I usually ask a question, get an answer, and decide what to do next myself.

Claude Code, on the other hand, can use tools to read files, modify code, and run commands. It can then use the results of those actions to decide what to do next.

The course describes this process as the Agentic Loop.

Prompt
  │
  ▼
Gather context ──→ Take action ──→ Verify results ── Passed ──→ Output
    ▲                                 │
    │                                 │
    └──── Failed: adjust and retry ───┘

For example, if I ask Claude Code to fix an API bug, it can first search the relevant code, identify a possible cause, make a change, and run tests.

If verification fails, it can gather more information, revise its approach, and test again. Once it determines the task is complete, it returns the result.

This isn’t necessarily a single pass. It may go through the loop several times.

Two concepts are especially important here:

  • Tools: Claude Code uses the current task and context to decide when to call a tool and how to use the results it returns.
  • Context: The information Claude Code can refer to, including conversation history, file contents, and command output.

I can also step in at any point while Claude Code is working.

For example, I can provide more background information, interrupt an action, or redirect it if it seems to be heading in the wrong direction.

Using an AI agent doesn’t mean handing over a task and having no say until it finishes.

Three Things to Keep in Mind When Using Claude Code

After explaining the Agentic Loop, the course highlights three basic principles for working effectively with Claude Code.

1. The context window has limited capacity

The context window is somewhat like Claude’s working memory. It can hold a large amount of information, but that doesn’t mean I need to give it every file and document at once.

This is where Claude Code’s ability to find the information it needs becomes useful.

Based on the task, Claude Code can decide what information to look for, search through the codebase, read relevant files, and determine the next step from what it finds.

For example, when investigating an API error, it doesn’t need to read the entire project upfront. It can start with the relevant Controller, then trace through the Service, data access code, and other dependencies.

That way, it can gradually collect the information it needs within a limited context window, without loading the entire codebase at once.

2. Developers still control execution permissions

Claude Code offers different permission modes. Depending on the task, I can decide which actions require confirmation and which ones Claude Code can handle on its own.

Even when an automatic mode reduces the number of approval prompts, that doesn’t mean giving AI unrestricted control. Developers still need to manage what it is allowed to do.

3. Claude Code can make mistakes

Claude Code can misunderstand requirements, introduce bugs, or overcomplicate a problem that should have been simple.

Staying involved, checking the implementation direction, and reviewing the results throughout development can help catch these problems early.

That last point matters in particular: even if every test passes, the feature may still not meet the actual requirements.

If the test cases don’t cover certain business rules or edge cases, the code might run successfully while still producing the wrong outcome.

Context Management

Context is the information Claude can refer to in the current session, such as the conversation history, files it has read, and tool results.

But the context window has a limited capacity.

If I keep working on many problems in the same session, that information continues to accumulate.

When the context window approaches its limit, Claude Code automatically performs Compaction.

During compaction, it summarizes important information and removes unnecessary tool results so Claude Code can continue working.

However, some details can get lost in the process. For example, a specific constraint discussed earlier might not be fully preserved in the summary.

So while compaction frees up context space, it doesn’t guarantee that every detail will be retained.

Commands for Managing Context

The course introduces three related commands:

Command Purpose
/compact Manually compact the current context
/clear Clear the conversation context for the current session
/context View context usage and a detailed breakdown

The /context command provides a visual breakdown of how much context is being used and which categories take up the most space.

If I’m still working on the same task but the session has accumulated a lot of context, I can consider using /compact.

If I’m about to start an entirely different task, /clear can help prevent unrelated information from taking up context space.

Reducing Unnecessary Context Usage

Beyond these commands, the course describes three ways to use context more efficiently.

Be specific about the task

When I clearly explain the goal, relevant files, and constraints from the start, Claude Code spends less time guessing what I mean or searching unnecessarily.

For example, specifying which API needs to change, where the relevant code is, and what result I expect is usually more useful than simply saying, “Fix this feature.”

Manage MCP servers

MCP servers allow Claude Code to use external tools, but the tools they expose can also consume context space.

I can disable MCP servers that aren’t needed for the current task, rather than keeping unrelated tool information loaded.

Use Subagents

Subagents can work in their own context windows.

For example, I can delegate the analysis of a large set of test logs to a Subagent and have it return a summary to the main session.

That way, the main conversation doesn’t need to retain every intermediate step of the analysis.

This section changed how I think about context management. It’s not something to consider only when the context window is almost full.

How I describe a task, choose tools, and organize the work also affects how context is used.

Permission Modes: Controlling Tools and Access

Claude Code can modify files and execute commands directly, which makes permission controls an important part of using it.

The course introduces four Permission Modes:

Mode Main behavior
Manual Mode Requests approval for file edits and commands that require permission
Auto Accept Mode Automatically approves file edits and some common filesystem commands; other commands still require confirmation
Plan Mode Focuses on read-only exploration and planning without directly modifying code
Auto Mode Uses safety checks to reduce approval prompts; potentially risky actions may be handled differently or require confirmation

I think Plan Mode is particularly useful when I need to understand a system before changing it.

For example, if I’m about to modify a feature I’m not familiar with, I can ask Claude Code to read the relevant code and prepare a plan first. Once I’ve reviewed the approach, I can move on to implementation.

Auto Accept Mode reduces the need for repeated approvals during development.

As explained in the course, along with file edits, common filesystem commands such as mkdir (create a directory), rm (remove a file), and mv (move or rename a file) are automatically approved. Other commands still require confirmation.

With Auto Mode, Claude Code uses background safety checks to decide whether most actions can proceed, reducing the number of times it needs to ask for permission.

These checks are intended to block actions that are irreversible, destructive, or outside the current working environment.

When an action is blocked, Claude Code will generally try a safer alternative or ask for permission before proceeding.

However, the more freedom Claude Code has to act on its own, the easier it becomes for a developer to miss a problem before it happens.

That’s why the permission mode should match the type of task being performed.

Explore → Plan → Code → Commit

Of everything covered in the course, this is the workflow I most wanted to remember.

When using an AI coding tool, it’s tempting to describe a feature change and let the AI start writing code right away.

But in a project that’s been around for a while, features and modules often depend on one another. Changing code before understanding those relationships can affect existing functionality.

The course breaks the development workflow into four stages:

Stage Main activity
Explore Understand the project structure, existing features, and relevant code
Plan Create an implementation plan and define success criteria
Code Implement changes with tools, tests, and ongoing feedback
Commit Review changes, then commit and push the code

Explore: Understand the Project First

Suppose I need to add an order lookup API to an existing ASP.NET Core project.

If I immediately ask Claude Code to create a Controller, it may generate the code quickly. But it might not know how the project currently handles data access, authentication, or error responses.

A better approach is to have it read the relevant code first, understand the existing design, and gather the background information needed for the task.

This matters especially in internal enterprise systems. Some code may not look particularly clean, but there may be business requirements or historical reasons behind it. Changing it isn’t always the right move.

At this stage, I can use Plan Mode to let Claude Code focus on reading and exploring without modifying code.

Plan: Define What Done Looks Like

After exploration, the next step is to have Claude Code outline an implementation plan.

Besides deciding which files to change and how to make those changes, one important part of this stage is defining Success Criteria.

In other words, I should decide what counts as “done” before writing code.

For a new API, the criteria might include:

  • Return the expected data correctly.
  • Handle cases where no data is found.
  • Follow the project’s existing authorization rules.
  • Avoid breaking existing functionality.
  • Pass the relevant tests.

Without clear criteria, Claude Code might finish making code changes without actually solving the original problem.

Both Explore and Plan can be done in Plan Mode. I can review the requirements and proposed approach before deciding to move into coding.

Code: Keep Working Together During Implementation

Once the plan is confirmed, Claude Code can use the necessary tools to implement it.

This is where the Success Criteria defined during planning become important.

The course also recommends providing the tools and test suites Claude Code needs, so it can run tests and use the results to check whether the implementation meets the original goal.

The Code stage isn’t about having Claude Code generate a final solution in a single attempt. It’s an ongoing process of interaction.

As work progresses, I can provide additional information, adjust the direction, or work with Claude Code to identify and fix the causes of failed tests.

Through repeated implementation, verification, and adjustment, the planned feature gradually takes shape.

Commit: Review Before Committing

Finishing a feature doesn’t mean the code is ready to commit. I still need to check what actually changed and whether those changes match the plan.

The course introduces three commands related to checking and reviewing code:

Command Purpose
/diff View uncommitted code changes
/rewind Restore code and conversation state
/code-review Get a second opinion from an independent reviewer

First, I can use /diff to inspect the code changes and make sure their scope is what I expected.

If the entire approach turns out to be wrong, /rewind can take me back to an earlier state so I can reconsider the implementation.

There’s an important limitation to remember, though.

/rewind can restore code and conversation state, but it cannot undo changes made by shell commands.

For example, database operations that have already run, files deleted through shell commands, or effects on external services cannot be reversed simply by using /rewind.

Getting a Second Opinion with Code Review

The /code-review command was one of the features that stood out to me.

If I ask the same Claude Code session that implemented a change to review its own work, the review may be influenced by the earlier conversation and implementation decisions.

The /code-review command can use reviewers with independent context to examine the code from another perspective and look for potential problems.

However, not every Code Review suggestion needs to be addressed immediately.

The course groups the possible responses into three categories:

Response When to use it
Fix now A confirmed bug or a problem affecting core functionality
Ask why It’s unclear whether something is wrong or why a piece of code looks unusual
Defer A lower-impact issue that can be handled later

I found this categorization quite practical.

In an existing system, some designs may not be ideal, but that doesn’t mean they need to be changed as part of the current task.

If every Code Review suggestion leads to an immediate change, a simple feature request can easily turn into a large refactoring effort.

I’d rather understand the cause and impact of each issue first, then decide whether it needs fixing now. Issues left for later can be documented and scheduled for follow-up.

Once the code changes, test results, and review findings all look right, the next step is to commit and push the code before moving on to another feature.

Thoughts After Finishing the Course

Before this course, when I used AI coding tools, I mostly focused on whether the feature worked, whether the code was correct, and whether the AI understood my requirements.

What stood out to me this time was how much of the course wasn’t directly about generating code.

Topics such as the Agentic Loop, Context Management, Permission Modes, and the Explore → Plan → Code → Commit workflow were particularly useful.

The Explore → Plan → Code → Commit workflow, in particular, isn’t that different from traditional software development.

When I worked on internal enterprise systems, understanding existing code, checking business logic, and clarifying user requirements often took a considerable amount of time.

Actually writing the code came later.

Even now that AI can generate code quickly, that preparation hasn’t become any less important.

Having Claude Code help explore a system, organize an implementation plan, and define success criteria before coding seems much more useful than simply asking it to make changes right away.

AI can also help run tests and review code, but developers still need to decide whether the results meet the requirements and which issues are worth addressing.

That’s one thing I’d like to change about how I use AI coding tools after this course.

Rather than using AI only to get code written, I’d like to involve it in clarifying requirements, analyzing systems, planning changes, and reviewing code.

The second half of the course covers CLAUDE.md, Skills, Subagents, MCP, and Hooks—features that help Claude Code adapt to a project’s needs and integrate with tools and automated workflows.

I’ll cover those topics in Part 2.


References

Anthropic Claude Academy — Claude Code 101