Your First Session with Claude Code

Start Claude Code in a project folder, type your first request, answer its permission questions, and learn how to stop it and how to leave the session.

Checked against official docs on 29 Oct 2026

On this page

This guide shows you what to do after you install Claude Code. You start it in a folder, ask for something in plain words, and approve or refuse what it wants to do.

A session is one conversation with Claude Code. It starts when you type claude and ends when you leave.

Go to your project folder

Claude Code works on the files in the folder where you start it. Use a test folder first, not a folder with important files. If you do not know how to move between folders in the terminal, read Folders in the terminal.

Anthropic's own example uses cd (change directory) to go to the folder:

cd /path/to/your/project

Replace /path/to/your/project with the path to your folder.

Start Claude Code

claude

The first time, Claude Code asks you to log in. Follow the prompts. A browser window opens, and you sign in to your Claude account there. Claude Code saves your login, so you do not sign in again. To switch accounts later, type /login in the session.

After the login, you see the version, the model and the folder name above a prompt. The prompt is where you type. Check that the folder name is the folder you meant.

Type your first request

Type a question in plain words and press Enter. Anthropic suggests these first questions:

text
what does this project do?
text
explain the folder structure

Claude Code reads your files when it needs them. You do not have to paste them in.

Answer a permission question

When Claude Code wants to change a file or run a command, it can stop and ask you first. The question shows what it wants to do and gives you choices, for example:

  • Yes allows this one action.
  • Yes, and don't ask again allows the same kind of action later too. For commands, Claude Code saves this choice for the project.
  • No refuses. You can add a comment to tell it what to do instead.

Read the command before you choose Yes. If you are not sure, choose No and ask Claude Code to explain what the command does.

Choose a permission mode

A permission mode decides which actions Claude Code may take without asking you. Press Shift + Tab to switch the mode of the session. The status bar under the prompt shows the active mode.

ModeWhat Claude Code does without asking
Manual (setting name default)Only reads files. It asks before it edits files, runs commands or uses the network.
acceptEditsReads and edits files, and runs simple file commands such as mkdir. It asks for other commands.
planReads and writes a plan. It does not edit files until you approve the plan.
autoActs without asking. A second model checks each action in the background.

With Claude Code version 2.1.283 or later, a terminal session starts in auto mode. In this mode you see fewer questions. If you want Claude Code to ask before each change, start it in Manual mode:

claude --permission-mode default

You can also press Shift + Tab in the session. From auto, the first press switches to Manual mode. Use Manual mode until you know the tool well.

Stop Claude Code while it works

Press Esc to stop the current answer or action. Claude Code keeps the work it did so far, and you can type a new instruction.

Ctrl + C also stops a running action. When nothing is running, the first Ctrl + C clears what you typed, and a second one closes Claude Code.

Leave the session

Type /exit and press Enter, or press Ctrl + D twice on an empty prompt.

To go back to your last conversation in this folder later, start Claude Code with:

claude -c

Useful commands inside a session

Commands that start with / are slash commands. You type them at the prompt.

CommandWhat it does
/helpShows the available commands
/clearClears the conversation and starts fresh
/exitLeaves Claude Code

Type / alone to see all commands and skills. Press the up arrow to bring back an earlier message.

If something goes wrong

  • Claude Code works in the wrong folder. Type /exit. Use cd to go to the right folder. Start claude again. The folder name is above the prompt.
  • Claude Code changed files without asking. The session is probably in auto or acceptEdits mode. Press Shift + Tab until the status bar shows Manual mode, or start with claude --permission-mode default.
  • The terminal says claude is not found (on a Mac, zsh: command not found: claude). The install did not finish, or you opened the terminal before it finished. Close the terminal and open a new one. If the message stays, follow the install guide.
  • Enter sends your message, but you wanted a new line. Press Ctrl + J, or type \ and then press Enter. Anthropic says both work in every terminal. Shift + Enter works only in some terminals.
  • You allowed an action for good by mistake. Type /permissions. It lists every saved permission rule and the settings file it comes from. Remove the rule there.
  • Your old conversations are gone. Claude Code keeps conversations on your computer, in ~/.claude/projects/, for 30 days by default. The cleanupPeriodDays setting changes this period.
  • Claude Code forgot what you told it after you came back from a break. When a long conversation sits idle for about an hour, Claude Code can compact it: it replaces the conversation with a summary. To stop this, add "idleCompaction": false to ~/.claude/settings.json. This needs Claude Code v2.1.290 or later. Put rules that must last in CLAUDE.md, because Claude Code loads that file again after a summary. To choose what a summary keeps, type /compact focus on and your topic, for example /compact focus on the API changes.
  • Claude answers in the wrong language, or mixes two languages. Add the language setting to ~/.claude/settings.json, for example "language": "japanese". Claude Code then tells Claude to always answer in that language. Claude Code does not check the value, so spell the language name correctly.

Next, you can give Claude Code a superpower: install a skill or plugin.

Sources