How to use Claude Code: your first session, permission modes, and undoing changes
A beginner's guide to Claude Code after you install it: your first session, permission modes, CLAUDE.md, undoing changes with /rewind, and the commands you'll use.


The short answer
Open a terminal in your project folder and run claude. The first time, sign in with a Claude Pro, Max, Ultra, Team or Enterprise plan, or an Anthropic Console account. Then talk to it the way you'd talk to a colleague: ask what the project does, then ask for one specific change. Claude Code reads the files it needs on its own.
- Ask before you change anything
Start with "what does this project do?" or "explain the folder structure". Letting Claude explore first gives better changes later.
- Ask for one specific change
"Fix the login bug where users see a blank screen after a wrong password" works better than "fix the bug". Claude shows the change and, in the default mode, asks before applying it.
- Review, then commit
Run
/diffto see what changed, or just ask "what files have I changed?". Then ask Claude to commit with a descriptive message.
Article · How to install Claude Code on macOS, Windows and Linux → Not installed yet? How to install Claude Code on Mac, Windows and Linux.
Permission modes: how much Claude does without asking
Press Shift+Tab to switch the mode of the session you're in.
| Mode | Runs without asking | Good for |
|---|---|---|
| Default (manual) | Reading files in your project | Unfamiliar code, sensitive work |
| acceptEdits | Reads, file edits and common file commands such as mkdir and mv | Iterating on code you're reviewing |
| plan | Reading, to propose a plan before any edit | Exploring before you change things |
| auto | Everything, with safety checks in the background | Long tasks, fewer prompts |
| bypassPermissions | Everything, with no checks | Isolated containers and virtual machines only |
Article · Claude Code and Codex permission modes: auto, plan, --dangerously-skip-permissions and --yolo → Auto, plan and --dangerously-skip-permissions in detail, next to Codex's --yolo.
Tell Claude how your project works: CLAUDE.md
Run /init and Claude reads your codebase and writes a starting CLAUDE.md: build commands, how to run the tests, the conventions it found. Edit it and commit it, and every session starts from it. Preferences only you need go in CLAUDE.local.md, which you keep out of Git.
Article · AGENTS.md and CLAUDE.md: what they are, and one file for Claude Code and Codex → Also using Codex? AGENTS.md and CLAUDE.md, and how to keep one file for both.
Undo a change with /rewind
Claude Code saves a checkpoint before each message you send. Run /rewind (or /undo), or press Esc twice in an empty prompt, to go back: rewind the code, the conversation, or both.
Make Claude Code reply in Chinese
{
"language": "chinese"
}Claude Code passes the language value to Claude as an instruction to always reply in that language, so any language name works, such as "chinese" or "japanese"; it isn't checked, so a typo goes through as written. The same value sets the language of voice dictation and of automatic session titles. It changes the language Claude replies in, not Claude Code's own interface. You can also write a line such as “Always reply in Simplified Chinese.” in your CLAUDE.md.
The commands you'll use most
| Command | What it does |
|---|---|
/model | Switch the model and save it as your default |
/plan | Enter plan mode, optionally with a task |
/diff | Review the changes in your working tree |
/review | Run a code review |
/compact | Summarize the conversation to free up context |
/context | See how much of the context is in use |
/usage | Session cost and your plan's usage limits |
/clear | Start a new conversation; /resume brings the old one back |
claude -c | From the terminal: continue the last conversation in this folder |
claude -p "…" | From the terminal: ask once and exit, for scripts |
Type / to see every command and skill available to you; Tab completes, and ↑ brings back earlier prompts.
Article · How to install skills in Codex and Claude Code, and share one set between agents → Add skills to Claude Code, and share them with Codex.
Article · How to add MCP servers to Claude Code and Codex → Connect Claude Code to your tools: how to add MCP servers.
Article · Claude Code settings.json: where it is, which file wins, and the settings worth changing → Set the default model, permissions and more in settings.json.
Article · Claude Code and Codex in VS Code: install the extensions and get started → Prefer your editor? Claude Code and Codex in VS Code.
Article · Claude Code desktop: what the app does, and another way to run it on your desktop → Prefer an app window? Claude Code in the Claude desktop app.
Article · Code review with Claude Code and Codex: /review, GitHub reviews and a second opinion → Reviewing code with /code-review, and getting a second opinion from Codex.
Claude Code next to other agents in Mira
Mira is a desktop app for macOS, Windows and Linux that runs Claude Code itself. If you already installed Claude Code, Mira uses that copy and your existing sign-in. Claude Code can sit in a pane next to Codex or another agent, and you can follow the same sessions from your phone. Mira is not an Anthropic product.
Questions
- Do I need to add files to the context myself?
- No. Claude Code reads your project files as it needs them.
- How do I continue yesterday's conversation?
- Run
claude -cin the same folder to continue the latest one, orclaude -rand pick one. Inside a session,/resumeopens the same list. - Can I use Claude Code without a Claude subscription?
- Yes: with an Anthropic Console account and prepaid API credits, or through Amazon Bedrock, Google Cloud or Microsoft Foundry.
Article · Claude Code usage limits: what the messages mean, and how to keep working → Claude Code usage limits, and what to do when you hit one.
Article · How to use Codex: your first task, permissions, and the commands you'll use → The same guide for Codex.
Article · Claude Code Remote Control, and other ways to use Claude Code from your phone → Use Claude Code from your phone with Remote Control or Mira.
Article · Claude Code agent teams, and teams that mix agents and people → Run several Claude Code sessions together with agent teams.
Article · Claude Code pricing: what each plan costs, what the API costs, and paying only for what you use → Claude Code pricing: plans, API costs and ways to spend less.
Article · Running two coding agents in one repository → Run parallel Claude Code sessions in one repo with git worktrees.
Article · Claude Code errors: fixing 529 Overloaded, 429, Prompt is too long, and connection errors → Fixing Claude Code 529 Overloaded, 429, Prompt is too long and connection errors.
Article · Scheduled tasks in Claude Code and Codex: /loop, cloud tasks, and recurring automations → Running recurring tasks on a schedule in Claude Code, Codex, and Mira Automations.
Article · Running Claude Code (`claude -p`) and Codex (`codex exec`) in scripts and CI → Running `claude -p` and `codex exec` non-interactively in scripts and CI.
Article · Claude Code /rewind and /undo: checkpoints, what isn't tracked, and branching sessions → Undoing edits with Claude Code `/rewind` and `/undo`, plus visual rewind and branching in Mira.
Article · Using Claude Code with Chrome and Codex Browser: live debugging, Playwright, and previews → Debugging web apps with Claude Code Chrome, Codex Browser, Playwright, and Mira previews.
Sources
Checked on November 25, 2026 against Anthropic's documentation at code.claude.com/docs/en: quickstart, permission modes, memory, checkpointing and the commands reference. Claude Code changes quickly, so check those pages for the latest.
Keep reading

Fixing OpenAI and Codex 403 “unsupported_country_region_territory”
Why OpenAI and Codex return 403 unsupported_country_region_territory, how to fix false positives on VPNs or cloud IPs, and compliant alternatives.

Running Claude Code and Codex on Amazon Bedrock, Vertex AI, and Microsoft Foundry
Connect Claude Code and Codex to Amazon Bedrock, Vertex AI, and Microsoft Foundry: env vars, config.toml, auth, model pinning, and limits.

Using Claude Code with Chrome and Codex Browser: live debugging, Playwright, and previews
How to connect Claude Code to Chrome (extension, console logs, login limits) and use Codex Browser or Playwright, plus live dev-server previews in Mira.