AI-101

Lesson 3

Your First Session

AI Confidence: 90%

AI-generated

Your First Session

Learning Objectives

Start Claude Code in a project directory

Complete the login process with your account

Ask your first questions about a codebase

Understand the different account types and their costs

Know what happens behind the scenes when Claude reads your code

Introduction

You have Claude Code installed. Now it is time to start your first session. This is where you begin to see what makes Claude Code different from other tools. You will log in, point Claude at a project, and start a conversation about your code.

The first session might feel a bit magical. You ask Claude Code about a project, and it reads through your files to give you answers. There is no setup required. You do not need to tell Claude which files matter or explain your project structure. It figures that out on its own.

This lesson walks you through starting a session, logging in with your account, and asking your first questions. By the end, you will have had a real conversation with Claude Code about actual code.

Starting a Session

To use Claude Code, you need to be inside a project directory. Claude Code works at the project level. It reads the files around it to understand what you are working on.

Open your terminal and navigate to a code project. This can be any project with source code. If you do not have one handy, you can clone a public repository to experiment with. For example:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Once you are inside a project directory, start Claude Code:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

The first time you run this command, Claude Code will prompt you to log in. After that, it remembers your credentials, so future sessions start immediately.

You will see a welcome screen with information about your session. The screen shows recent conversations, helpful tips, and any updates since your last session. At the bottom, you will see a prompt where you can type your first message.

Logging In

Claude Code requires a paid account. There is no free tier. The first time you run Claude Code, it will guide you through the login process.

You have several account options:

Claude Pro ($20 per month). This is the most common choice for individual developers. It gives you access to Claude Code with standard usage limits. Most developers find the Pro plan sufficient for daily use.

Claude Max ($100 or $200 per month). If you hit the usage limits on Pro regularly, Max gives you more capacity. The $100 plan provides 5 times the Pro limits. The $200 plan provides 20 times the Pro limits. Heavy users who spend all day in Claude Code often find Max worthwhile.

Claude Team and Enterprise. These plans are for organizations. They include centralized billing, SSO (single sign-on), and administrative controls. Contact Anthropic sales if your company wants to adopt Claude Code.

Anthropic Console (API access). If you have an Anthropic Console account with API credits, you can use that instead of a subscription. This is pay-per-token pricing. When you log in this way, Claude Code automatically creates a "Claude Code" workspace in your Console for tracking costs.

Cloud providers. Enterprise users can also connect through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. These require additional setup.

For most people reading this guide, the Pro plan at $20 per month is the right starting point. You can always upgrade later if you need more usage.

When you start Claude Code for the first time, follow the prompts to log in. This typically opens a browser window where you sign in to your Claude account. Once authenticated, the browser closes and you are back in the terminal, ready to go.

If you ever need to switch accounts or log in again, use the /login command inside Claude Code.

Asking Your First Questions

Now comes the fun part. With Claude Code running inside your project, you can ask questions in plain English.

Start with something broad:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude Code reads your files (package.json, README, source files) and gives you a summary. This might take a few seconds the first time as it builds an understanding of your codebase.

Try some follow-up questions:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude Code answers based on what it actually finds in your code, not generic guesses. If your project uses Express and React, it will tell you that. If the entry point is in src/index.ts, it will point you there.

You can also ask about specific parts of the code:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude Code traces through your code to answer these questions. It might read several files to piece together how different parts connect.

Try asking Claude about its own capabilities too:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

These questions tap into Claude's knowledge about itself, separate from your codebase.

What Happens Behind the Scenes

When you ask Claude Code a question, several things happen that you do not see.

First, Claude Code looks at your project structure. It reads key files like package.json, README.md, and configuration files to get an overview. It notes what programming languages are present, what frameworks are used, and how the project is organized.

Second, based on your question, Claude Code decides which files to read in detail. If you ask about authentication, it looks for files with names like "auth," "login," or "user." It reads those files and understands the code inside them.

Third, Claude Code builds a response using everything it learned. It combines knowledge from multiple files into a coherent answer.

All of this happens inside what Claude Code calls the context window. The context window is like Claude's working memory. It holds your conversation, the files Claude has read, and any command output. There is a limit to how much fits in this window. As your session goes on and Claude reads more files, the context fills up.

We will cover context management in detail later. For now, just know that Claude Code is reading your actual files to answer your questions. It is not guessing or using generic knowledge. It is looking at your code.

Ending Your Session

When you are done, you can exit Claude Code in several ways:

Type exit and press Enter

Press Ctrl+D (or Cmd+D on macOS)

Type /exit and press Enter

Your session is saved automatically. The next time you open Claude Code in the same project directory, you can pick up where you left off using claude --continue or the /resume command.

Do not worry about losing your conversation. Claude Code stores sessions locally, so you can always come back to them.

Key Takeaways

Start Claude Code by running claude inside a project directory

The first time you run it, you will log in with your Claude account

Pro costs $20 per month and works for most individual developers

Ask questions in plain English and Claude reads your files to answer

Claude Code actually reads your code rather than guessing

Sessions are saved automatically so you can resume later

Try It Yourself

Complete your first Claude Code session with these steps:

Open your terminal and navigate to a code project (any project with source files).

Run claude to start Claude Code.

Complete the login process if prompted.

Ask Claude these three questions:

- "what does this project do?"

- "what technologies does this project use?"

- "where is the main entry point?"

Ask one question specific to your project, something you genuinely want to know.

Type exit to end the session.

Take note of how Claude's answers reflect your actual code, not generic information. This is the foundation of everything else you will learn in this guide.

Sources

https://code.claude.com/docs/en/quickstart - First session walkthrough, basic commands

https://code.claude.com/docs/en/authentication - Account types, login process, credential management

https://claude.com/pricing - Current pricing for Pro, Max, Team, and Enterprise plans