Your First Session: Understand Before You Change
Start Claude Code safely: a clean git state, a read-only first task, and a habit of watching what the agent reads and runs. Use the agent to learn a codebase before you let it change one.
Start With a Question, Not a Change
The safest and most useful first task for any agent is one that changes nothing: ask it to explain the codebase. You learn how the agent works (what it reads, how it searches, how it reports back) without risking a single file. You also get a map of the project that you can check against what you already know.
That check is the point. If you know a codebase well, a read-only session tells you how far to trust the agent’s understanding. If it gets your architecture wrong, you’ve learned something important before it touched anything.
Set the Stage
- 1 Clean git
Commit or stash first
- 2 Right folder
Start in the project root
- 3 Default mode
Approve each change
- 4 Ask, don't tell
Read-only questions
- 5 Watch
Read the tool calls
- Get to a clean git state. Run
git status. Commit or stash anything in progress. Git is your undo button. A clean starting point meansgit diffwill show exactly what the agent did, and nothing else. - Start in the project root. Claude Code’s working directory is its default boundary. Starting in your home folder hands it far more than the project.
- Stay in the default permission mode. By default, Claude Code asks before it edits files or runs commands that aren’t on an allow list. Keep that until you’ve watched it work. (Module 2 covers the other modes.)
- Ask questions, don’t give orders. Start with prompts like the ones below.
- Watch the tool calls. The transcript shows every file read, every search, every command. Reading them is how you learn what the agent does when you aren’t looking.
cd ~/code/my-project
git status
claude
Good First Prompts
| Prompt | What you learn |
|---|---|
| ”Give me a tour of this repo: main entry points, how a request flows through it, and where the tests live.” | Whether its mental model matches yours. |
| ”How does authentication work here? Point me to the specific files and functions.” | Whether it can find and cite real code rather than guessing. |
| ”What would I need to change to add a new field to the user profile? Don’t make changes, just list the files and why.” | How it plans, and whether its plan matches what a teammate would say. |
| ”What looks fragile or under-tested in this codebase?” | Its judgment, which you can compare with yours. |
| ”Explain the last five commits in plain language.” | Whether it uses git history as context. |
Notice the instruction in the third row: “Don’t make changes.” Stating the boundary in words is a habit worth building, even when the permission mode would also catch it.
Common mistake: reading the agent’s confident summary of your architecture and accepting it as fact.
Agents fill gaps. If it didn’t open the file that holds the real routing logic, it may describe a reasonable-sounding design that isn’t yours. Spot-check: open two or three files it cites and confirm they say what it claims. If it cites a function that doesn’t exist, you’ve learned how much to trust its next summary.
Reading the Transcript
Each tool call is a small piece of evidence about the agent’s process. As you watch, ask:
- What did it read? If it explained the payment flow after reading one file, that’s thin.
- What did it skip? Did it ignore the
docs/folder or the config that changes everything? - What did it run? Even read-only questions can trigger commands like
ls,grep, orgit log. Those are normal. Anything that writes, installs, or touches the network deserves a closer look. - What did it assume? Phrases like “this likely” or “presumably” mark guesses. Ask it to confirm them by reading the code.
This is process discernment, judging how the agent got its answer, not just the answer itself. You’ll use it in every later module.
Ending Cleanly
When you’re done, run git status again. After a read-only session, it should be unchanged. If it isn’t, find out why before you continue. Something wrote to disk that you didn’t expect, and that’s worth understanding now, while the stakes are low.
Pick a repository you know well, ideally one you wrote or maintain.
- Get to a clean git state and start Claude Code in the project root.
- Ask for a repo tour and one “how does X work?” question about a feature you know deeply.
- While it works, jot down every file it reads and every command it runs.
- Score its answer: what did it get right, what did it get wrong, and what did it guess?
- Run
git statusat the end and confirm nothing changed.
Keep your notes. Your score is a rough baseline for how much context this agent needs on this codebase, which you’ll use when you write a CLAUDE.md in module 3.
1. Why start your first Claude Code session from a clean git state?
Git is your safety net. A clean start makes the agent's changes easy to see and easy to undo.
2. Why is a read-only codebase tour a good first task?
A read-only task lets you calibrate trust before anything is at stake.
3. The agent explains your payment flow confidently after reading one file. What's the fluent response?
Process discernment: an answer built on little reading deserves verification before you rely on it.
Up Next
You’ve seen the agent work. Module 2 turns to Delegation: which tasks to hand off, and how much autonomy to grant.