AICODEAgentic Programming · 67723 · 2026-7

Week 1 · video 3 of 4 · transcript

Running Claude Code

0:01

This lecture shows how to install a coding agent and start using it in a terminal. Our examples use Claude Code. We'll walk through how to install it on your computer. You can use another coding agent for this course if you prefer. The basic way of working is similar across these tools. Their commands and settings can differ. We'll also look at how to sign in, start your first session, and check the usage limits on your account.

0:29

A command-line interface, or C L I, lets you work by typing into a terminal. That is where you talk to the coding agent. You give the agent a task in ordinary language. In this example, we ask it to fix a failing test.

0:44

The agent needs to find out why the test failed. It can read the code, look at the tests, and read the project's instructions. Reading these files helps it learn things that you did not put in your request.

0:57

The agent can change the files itself. For example, it might find a problem in a function and edit that function. These are changes to the files in your project.

1:07

The agent can also run commands. The examples here run the tests or build the program. The agent reads the result and uses it to decide what to do next.

1:17

In a chat, you might get code that you have to copy into your project. Here, the agent can read files, edit them, and run commands directly. It may do these things several times during one task. A command can run successfully even when the code is still wrong. You still need to check the changes and the results.

1:38

Our examples use Claude Code, a coding agent made by Anthropic. Claude is the name of the models, including Opus, Sonnet, and Haiku. Claude Code is the program that lets those models use tools to work with your project.

1:51

You can also use Claude Code inside editors such as Visual Studio Code and JetBrains. The agent appears in a panel beside your code. Our examples use the terminal. The basic way of working also applies inside an editor, though some controls look different.

2:08

Other coding agents include OpenAI's Codex C L I, Google's Gemini C L I, and open-source options such as OpenCode. These are examples, not a complete list. These tools let you give tasks to an agent that works with your project. Many offer files for saved instructions, slash commands, and settings that control what the agent may do. The basic ideas are similar, but the commands and settings can differ.

2:36

The course examples use Claude Code throughout. Working with one tool lets us spend more time learning how to use it well, instead of repeating the setup for several tools. Still, you yourself can use any of these tools for the labs and project. Follow the instructions for the tool you choose when its commands or settings differ.

2:56

This first command installs Claude Code on macOS, Linux, or Windows through W S L. It downloads and runs Anthropic's install script. Copy it from the official instructions and check where it comes from before running it. When you install this way, the tool updates itself unless you change that setting.

3:16

Claude Code can also run directly on Windows. This PowerShell command installs it there. It is another option, not an extra step after installing in W S L.

3:26

You can also install Claude Code with Homebrew or npm. Choose one method. You don't need several copies. With Homebrew, you normally run updates yourself. Check the official setup and update instructions for whichever method you use.

3:41

On Windows, use W S L two for the course. It lets you use Linux within Windows. Open its Linux terminal and run the Linux install command there. The labs use a Unix-style shell, the kind of command-line program you'll find on macOS and Linux. Keep the agent and your project tools in the system you'll use for the course.

4:02

After installing, type claude, followed by double dash version, in your shell. If it prints a version number, your terminal can find and run the program. The claude doctor command checks your setup in more detail. It can report problems with the installation or settings and suggest fixes. Fix those problems before starting the lab.

4:23

To use the model, you need to sign in. This is called authentication. One option is to sign in through your browser with a Claude subscription that includes Claude Code, such as Max. The plan includes a limited amount of use, with no separate per-token charge within that limit. You can be charged for more use if you turn on extra usage. Check your billing settings so you know whether this is enabled.

4:49

Another option is to use an Anthropic API key. The key lets the program connect to your API account. With API access, you pay for what you use. Both the text you send and the text the model writes are counted in small pieces called tokens. A script can use the key without a person signing in through a browser each time. This is useful for jobs that run automatically. The API bill is separate from your subscription. If you use the agent a lot, a subscription will cost far less than paying for the same work through the API. The specifics naturally depend on the plan, the models you choose to use, and how much you use them.

5:27

For the course, we expect you'll need Claude Max 5x, or a similar plan that works with another agent. Check the current plan terms before you buy. Inside Claude Code, slash login lets you sign in or switch accounts.

5:43

Start in your project's folder. Here, the c d command opens the folder "my-project". Use your own project's name and location. The folder tells the agent where you want it to work. Using Git in that folder will help you save versions and undo changes. More on that, later in the course.

6:03

Type claude to start a session. This opens Claude Code in your terminal, where you can type requests and read the agent's replies.

6:11

The first time you start Claude Code, follow the steps to sign in. If you're using a browser login, finish those steps in the browser. If you're already signed in, you may not be asked again.

6:23

Start with a question whose answer you can check, such as what does this project do? You can also tell the agent not to change any files. Watch which files it reads, then check its explanation against them.

6:37

You are now working inside a session. Slash status shows your current settings, including the model and how you're signed in. Use it to check the setup and account you're using.

6:48

When you open a project, Claude Code may ask whether you trust it. The workspace line near the top shows which folder it is asking about. Check that this is the folder you meant to open. If it isn't, choose to exit and start the agent again from the right folder.

7:04

The prompt says the agent will be able to read, edit, and run files here. Those actions still depend on its permissions. Trusting the folder does not make every later action safe. Think about where the project came from. Its files may contain instructions for the agent, settings, or code it can run. If you don't know the project, look through it before you trust it.

7:27

This screenshot shows the main screen inside a Claude Code session. The welcome box shows the model, the plan, and the project folder. Your screen may look a little different depending on your account and version of Claude Code.

7:41

Type your request on the input line near the bottom of the screen. Tell the agent what you want it to do and what it must not change. Watch its work and check the answer. A request alone does not block edits, so use permission settings as well if you need to prevent them.

7:58

A subscription does not give unlimited use. This screenshot shows the usage screen, with bars for the limits that apply to the account. The current-session bar shows use within a five-hour window. Check the reset time printed below it. There is also a separate weekly limit across all models. It resets at a fixed weekly time shown for your account. You might have room left in the five-hour window but have already reached the weekly limit. You may also see limits for individual models, as in the lower bar here. The Max five-times plan gives roughly five times the per-session allowance of Pro. Heavy users may need an even more expensive account.

8:40

Claude chat and Claude Code can share the same usage limit. Using Claude on the web or in the desktop app can leave you with less use available for coding. Usage is not just the number of requests you send. Earlier messages and files can be included again with each new request. A longer conversation can therefore mean more text for the model to process. Larger models can also use the allowance faster than smaller ones. The amount depends on the model and the work it does.

9:09

Slash usage shows how much you've used and when the limits reset. Check it during longer tasks, especially when you're close to a limit. In the current tool, slash cost is another name for slash usage. The cost estimate at the top uses API prices. It is not an extra bill for work your subscription covers. If you pay through the API, check the actual bill rather than relying on this estimate.

9:36

There is more to working with an agent than setting it up. We can't cover these three topics fully in the first week, so we are leaving the details for later. For now, there are a few habits that you should aim to use from the start.

9:49

Use Git from the start of the project. When you have a working version, save it as a commit before making a large change. Check what changed before you save the next commit. A commit gives you a saved version to compare with or go back to. We'll cover Git and GitHub in detail later.

10:06

Permission modes control how often the agent asks before acting. The next video introduces the modes you'll need for the lab. We will cover saved permission rules and ways to limit the agent's access in more detail later. While you're learning, keep the approval prompts turned on. Read what the agent wants to do before you approve it. Check which files it could change and whether it could change something outside your computer, such as a shared repository. Only give permission after checking the action.

10:35

A new session does not automatically include the whole earlier conversation. The context window is the limited amount of information the model can use at once. Memory files can save instructions or facts for another session. We'll cover both next week. You don't need the full details before the first lab. Tell the agent what you want to do and what it needs to know about the project. Saved instructions or memory can carry some information into a new session. You can also resume an earlier session. Check what the agent knows rather than assuming it remembers every decision.

11:09

You now know how to install Claude Code, sign in, and start a session. Try a simple request and check the answer to make sure your setup works.

11:18

The next video looks at working within a session. Before the lab, have the tool installed and signed in. The lab handout lists the other tools and accounts you need.

11:27 of video · 1,959 words · 36 slides← Back to the video