Claude Code: Your First Session
Install it, point it at a real folder, and make it prove it understood your code before it is allowed to touch a line of it.
install Claude Code, run a first session in Manual mode, make it explore a project and explain it back, and leave the session cleanly
- A terminal you can open and 20 uninterrupted minutes (Lab 00)
- Git installed (Lab 00) — on Windows that is Git for Windows
- A paid Claude plan, a Console API key, or a guest pass — read the first section if you have none
Most first sessions with an agent go badly for one reason: people ask it to build something. You are going to do the opposite. Install it, point it at a folder, and spend the whole first session making it read — then check whether it actually understood.
By the end you will have a working install, a session you can leave and resume, and one prompt worth keeping forever.
What this costs, and what to do if you cannot pay
Claude Code is not included in the free claude.ai plan. You need Pro, Max, Team, Enterprise or a Console API account (setup docs). The cheapest door is Pro at $20 a month, or $17 a month billed annually — the pricing page prints that as “$200 billed up front”. Pro sessions default to Sonnet 5; Max, listed as “From $100 Per month”, defaults to Opus 5 (model config).
An API key is pay-per-token: cheap for one evening, expensive as a habit. Anthropic’s own cost docs put real usage at about $13 per developer per active day, $150–250 a month. A subscription is not unlimited either — your allowance resets on a rolling five-hour window plus a weekly one, shared with Claude chat and Cowork.
Kazakhstan is on Anthropic’s supported countries list, for claude.ai and the API. If you ever see App unavailable in region, that is a country or VPN problem, not an account problem (troubleshooting).
One more route: ask your mentor about /passes, described in the commands docs as sharing “a free week of Claude Code with friends” from an eligible account. Which accounts qualify is not documented, so ask rather than assume.
Install it with one command
Pick the line for your shell. On Windows, a prompt showing
PS C:\is PowerShell;C:\withoutPSis CMD. Pasting the wrong one is the single most common failure in this lab.curl -fsSL https://claude.ai/install.sh | bashirm https://claude.ai/install.ps1 | iexcurl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdThat is the native installer; it updates itself in the background. You need neither Node nor WSL — native Windows works. Git for Windows is optional, but install it from git-scm.com anyway: with it, Claude runs its Bash tool through Git Bash instead of falling back to PowerShell (setup docs).
Open a NEW terminal and check the install
The old terminal does not know about the new binary. Open a fresh one.
claude --version claude doctorclaude --versionprints something like2.1.269 (Claude Code).claude doctoris a read-only diagnostic of your install and settings — nothing it does can break anything.Give it something real to read
Never run
claudein your home folder or on your Desktop — from there it can see and index everything you own. Alwayscdinto a project first. Have a small project already? Use it. Otherwise build this one; it takes three minutes, and it is small enough that you can check the agent’s answer against the code yourself.mkdir qairu-cards; cd qairu-cards; git initmkdir qairu-cards && cd qairu-cards && git initNow create three files in your editor.
words.js:const PAIRS = [ { kk: 'кітап', en: 'book' }, { kk: 'терезе', en: 'window' }, { kk: 'қала', en: 'city' }, { kk: 'су', en: 'water' }, { kk: 'дос', en: 'friend' }, ];index.html:<!doctype html> <html lang="kk"> <head> <meta charset="utf-8" /> <title>QAIRU Cards</title> </head> <body> <div id="card">...</div> <script src="words.js"></script> <script> let i = 0; let flipped = false; const card = document.getElementById('card'); const render = () => { card.textContent = flipped ? PAIRS[i].en : PAIRS[i].kk; }; card.onclick = () => { flipped = !flipped; render(); }; document.onkeydown = (e) => { if (e.key === 'ArrowRight') { i = (i + 1) % PAIRS.length; flipped = false; render(); } }; render(); </script> </body> </html>README.md:# QAIRU Cards A tiny Kazakh-English flashcard page. Open index.html in a browser. Click a card to flip it. Use the Next button to move to the next word.Read that README once more, then open
index.htmlin a browser and click around. Keep what you notice to yourself for now.Start the session in Manual mode
claude --permission-mode manualOn Pro, Max and Team plans, a normal
claudenow starts in auto mode, where a second classifier model reviews actions instead of asking you (permission modes). That is convenient and you will use it later. For your first four labs, force Manual: it reads only, and it asks before anything else, so you actually see what the agent wanted to do.On first launch a browser opens for login. Credentials are stored, so this happens once;
/loginswitches accounts and/logoutsigns out. The first time you run Claude in any folder you also get a workspace-trust dialog.The header shows three things worth reading: the version, the current model, and the working directory. Check the directory. If it is not
qairu-cards, pressCtrl+Ctwice andcdproperly. The status bar underneath should readmanual mode on.Learn the controls before you ask for anything
Do these in order, inside the session, before you ask it anything real.
/help— every command. There are around ninety; you need about fifteen.?on an empty line — the keyboard shortcut panel.! git status— shell mode. You run the command yourself and the output drops into the conversation.Shift+Tab— cycles permission modes. Press it a few times and read the status bar each time:manual mode on,accept edits on,plan mode on. Land back on Manual.
Two keys to memorise rather than try:
Escinterrupts Claude mid-action and keeps the work so far, andCtrl+Oopens the transcript viewer, which shows every tool call in detail. Everything in this list is from the interactive mode docs.Finally run
/usage. It shows your plan bars and where the tokens went. If you are on a subscription, ignore the dollar figure — the docs are clear that it only means something for API users (costs).Make it explore before it edits
Here is the prompt. Type or paste it exactly. Notice what it does: it forbids edits, it scopes the reading to one small project, it asks for a claim you can check, and it ends by making the agent ask you something.
Do not change any files yet. Read this project and answer in plain text: 1. What does it do, in two sentences? 2. List every file and say what each one is for. 3. Where does the data live, and where is it rendered? 4. Name one thing the README claims that the code does not actually do. 5. What would break first if I added 200 more word pairs? Then stop and ask me one question about what I want to build next.You will see it search and read files. It gathers context on demand — you never paste code in yourself.
Judge the answer with a rubric, not a feeling
A good answer does four things. Check them off:
- Names all three files, and says
words.jsholds the data whileindex.htmlholds the markup and the behaviour in one file. - Finds the README mismatch. The README promises a Next button. There is no button in the code — only the Right Arrow key. If it missed this, it skimmed.
- Answers question 5 with a mechanism, not a vibe: all pairs load at once, there is no shuffle, no progress is stored, nothing is paginated.
- Ends with a question, because you asked it to.
The tell of a bad answer is fluent, confident prose that never quotes a file. So test it:
Which of your five answers are you least confident about, and exactly what did you read to decide it? Give me the file name and the lines you relied on.The docs have a name for this failure: the trust-then-verify gap — plausible code that misses the edge cases. Their fix is to give the agent a check it can run, a test or a script or a screenshot, and their rule is one line: cannot verify it, do not ship it (best practices).
- Names all three files, and says
/clear versus /compact — the difference that saves your session
Run
/context. It shows what is filling the window right now: the conversation, every file read, command output, memory files. Sonnet 5 and Opus 5 hold a million tokens and auto-compact at about 967K by default (model config), but quality still degrades as the window fills. A big window buys you time, not quality.The rule, one line each:
/compactsummarises the conversation and frees space, keeping the thread. Steer it:/compact keep the file list and the README mismatch. Use it on the same task, gone long./clearstarts a new conversation with empty context. It costs nothing. Use it when the next thing you do has nothing to do with the last thing you did.
Do it in that order now. Compact with an instruction, run
/contextagain and watch the number drop. Then/rename first-sessionso/resumecan find this conversation tomorrow, and/clear. In the empty session, try/compactonce more: it answersNot enough messages to compact.— proof that compacting is about a conversation, not about the tool.One rule of thumb from the docs is worth copying down: if you have corrected Claude twice on the same thing, do not correct it a third time.
/clearand write a better prompt.Leave, and prove you can come back
Type
/exit, or pressCtrl+Dtwice. Then, from the same folder:claude -c-ccontinues the most recent conversation in this directory. Your session is there, with the file list it built. Exit again. You are done.
Why a read-only first session is not a warm-up
It is the actual skill. Three of the five failure patterns the Claude Code docs name are failures of context, not of code: unrelated tasks piled into one conversation, correcting the same mistake until the window is full of failed attempts, and unscoped exploration that reads hundreds of files to answer a question you could have scoped in one sentence.
An agent that has read your project answers differently from one that is guessing, and the difference is invisible in the prose. That is the whole reason step 7 exists. Asking “what did you read to decide that” costs you one extra prompt and catches the most expensive class of mistake in this course.
One last thing beginners forget: the tool documents itself. Typing how do I do X in Claude Code? inside the session works, and it beats searching.
The five-question reading prompt, the follow-up that makes the agent cite its sources, and the four-point rubric for deciding whether it actually understood your project.
A fresh session has read your project and explained it back to you correctly without editing anything, and `claude -c` reopens that same conversation.