Skip to content

Getting Started with Claude Code: Your First Session

Core Concept LearningAugust 18, 20268 min read

Claude Code is a suite of AI-native coding interfaces — the same underlying agent loop works whether you're typing at the command line, editing in VS Code, using the Desktop app, clicking in a browser, or coding on your phone. The interface changes, but the core is always the same: you describe what you want to happen, Claude reads your actual files, makes the real edits, runs your actual tests, and reports what it changed. This article walks you through your first session on each platform, the permissions and configuration you need, and the immediate-return tasks where most teams see first wins — fixing a class of bugs across multiple files, running a test suite and debugging failures, or generating boilerplate from a schema.

If you are brand new to AI agents or Claude as a model, start with What Is Agentic AI first. If you want to understand the mechanics underneath (the loop, context, permission gates), read How Claude Code Works. This article focuses on getting productive in the first 30 minutes across all platforms you have access to.

Quickstart: CLI (command line)

The Claude Code CLI is the most direct way to start. Install it via npm, point it at a repository, and start typing instructions.

From your working directory (a Git repository):

1npm install -g @anthropic-ai/claude-code2cclude init3cclude start

The first cclude init command creates a .claude/ directory with a default configuration. The cclude start command launches an interactive session. From there, you can type instructions like Fix the race condition in payment-processor.js or Add type safety to this API response schema, and Claude Code will:

1. Read and search your actual repository 2. Propose edits to files 3. Ask for permission if the edit touches a sensitive path or tool 4. Execute shell commands to run tests or build steps 5. Report what changed and what still needs work

The session persists in memory within that terminal, so context from earlier steps is available to later steps — if you ask for a bug fix and then say run the test suite to verify, Claude Code remembers both the fix and the original problem statement.

Quick reference

  • Repositories cloned fresh will have a default .claude/settings.json with sensible defaults (read-only by default, local tools only, no secret access).
  • On your first write request, Claude Code will ask for explicit permission — accept once per path if you trust the change, or require confirmation every time.
  • Use cclude history to see past session logs and cclude resume [session-id] to pick up where you left off.
  • The CLI respects .gitignore — it will not read or edit files already ignored by your repository.

Remember this

CLI is fastest to start: one install, no UI to learn, and you stay in your terminal — ideal for scripted or automated workflows.

VS Code Extension

If you spend most of your time in VS Code, the Claude Code extension brings the agent loop directly into your editor. Install from the VS Code marketplace, sign in with your Anthropic account, and open any workspace.

Once installed, you'll see a Claude Code sidebar on the left. Open it, paste in your instruction, and Claude Code will read files from the workspace, make edits inline (you'll see diffs before confirming), and run terminal commands in the integrated terminal.

The key difference from CLI: edits are shown as side-by-side diffs before applying, and you can reject or accept individual changes rather than all-or-nothing. This is the interface most teams use for their daily workflow because it keeps you in the same editor where you're already working.

Quick reference

  • Install from the VS Code extension marketplace; Anthropic provides the official Anthropic Claude Code extension.
  • VS Code must be open to a repository folder (not a single file) for Claude Code to access the full codebase.
  • Set your .claude/settings.json at the repository root — the extension reads it to enforce permissions.
  • Use Ctrl+Shift+P → Claude Code: New Session to start a fresh isolated session without the context of past tasks.
  • The inline diff review step prevents accidental writes — reject changes you don't like before they apply.

Remember this

VS Code extension mirrors the CLI but with visual confirmation of each edit, making it safest for daily work when reviewing changes matters.

Desktop App (macOS, Linux, Windows)

The Claude Code Desktop app is a standalone executable (no web browser needed) that works on macOS, Linux, and Windows. Download from the official Anthropic website, install, and open your project folder from File → Open.

The Desktop experience is visually similar to VS Code — a left sidebar for instructions, a main area showing results and diffs, and a lower panel for terminal output. The main difference is that Desktop is self-contained: it does not depend on VS Code being installed, and it uses your system's default shell (zsh, bash, PowerShell, etc.) rather than embedding a terminal.

The Desktop app is often the first choice for new users who have not yet set up a CLI development environment, and it is especially useful on Windows where terminal tooling varies.

Quick reference

  • Download the latest release from https://claude.dev (official Anthropic Claude Code page).
  • After install, drag a repository folder into the app or use File → Open → select your project folder.
  • Desktop will create .claude/settings.json in your repository root if it does not exist.
  • Permissions work identically to CLI: first write request asks for confirmation, then remembers your choice.
  • Use the app's menu (or Cmd/Ctrl+O) to switch between repositories without restarting.

Remember this

Desktop app is the lowest-friction onboarding path for teams starting fresh; no CLI knowledge required.

Web UI (https://claude.dev)

Open https://claude.dev in any browser, connect your cloud storage or Git repository (GitHub, GitLab, Bitbucket), and start a session. The web version is useful for quick edits when you don't have the Desktop or VS Code extension installed, and it's the easiest way to onboard non-engineering team members (product managers, doc writers) to small, scoped tasks.

The trade-off: the web version has a shorter history window and slightly higher latency than Desktop or CLI, because the filesystem interaction happens over a network boundary. For deep refactoring across fifty files, Desktop or CLI is faster. For a quick hotfix or docs update, the web interface is convenient.

Quick reference

  • Sign in with your Anthropic account at https://claude.dev/code
  • Connect a repository by pasting a GitHub link or linking your cloud storage (Google Drive, Dropbox).
  • Web sessions cannot access secrets from .env files (for security); CLI/Desktop can access them if configured.
  • The web version will prompt you to fork or create a new branch before making changes, to prevent direct main branch edits.
  • Useful for one-off tasks or teaching without installing local software.

Remember this

Web UI trades raw speed for accessibility; ideal for remote collaboration or quick tasks where filesystem latency is acceptable.

Mobile (iOS, Android)

Claude Code on mobile (available via the Claude app on iOS and Android) is designed for supervision and quick edits when you're away from a desk. It works identically to the web version but is optimized for touch and small screens.

Typical mobile use case: you get a notification that a build failed; you open Claude Code on your phone, skim the error log, and ask Claude Code to apply a quick fix. The app confirms edits visually (because small-screen diffs are hard to read, the app shows a summary before applying), runs the fix, and shows you the result.

Mobile is not a replacement for Desktop or CLI for serious development work — the screen size makes reviewing large diffs difficult. It is, however, a critical tool for on-call engineers and remote teams who need to respond to production issues without access to a laptop.

Quick reference

  • Install the Claude app from the App Store (iOS) or Google Play (Android).
  • Open the Claude Code tab within the app; link a GitHub repository or cloud storage.
  • Mobile sessions have the same permission model as web: you confirm each edit before it applies.
  • Mobile uses the same .claude/settings.json from your repository, so permissions are consistent across all platforms.
  • Useful for code review, deploying a fix, or checking a job status from anywhere.

Remember this

Mobile is supervision and emergency response; not the primary development interface, but essential for teams that need always-on availability.

Your first tasks (where to start)

The best first tasks for Claude Code are narrowly scoped, have verifiable success criteria, and teach you how to work with the agent loop without overwhelming it. Here are three starting points:

Task 1: Fix a class of bugs. If you have an open bug ticket that you know is caused by a specific pattern (e.g., "missing null check on this object in three places"), that's a perfect first task. Give Claude Code the ticket, point it to the file, and ask it to find and fix every instance. Claude Code will search the repository, show you each fix, and run your test suite to verify.

Quick reference

  • Bug-fix tasks teach you: (a) how Claude Code searches a codebase; (b) how to review diffs; (c) how to iterate when tests fail.
  • Good first tasks have a test suite you can run to verify success — if there's no test, add one first.
  • Start with a single repository, not a monorepo with fifty services — too many files at once adds confusion.
  • "Consolidate duplicate logic" is also a good first task — search for a pattern, extract to a shared module, update all call sites.

Remember this

Pick a bounded, testable task where you can verify success with a test run or manual check — avoid ambiguous open-ended requests for your first session.

Permissions and safety in your first session

Claude Code asks for permission before it does three things: (1) editing files outside a designated safe zone, (2) executing commands that might have side effects (especially database commands or deployments), and (3) accessing secrets from environment variables or .env files.

When you initialize a repository with cclude init or open it in Desktop, the .claude/settings.json file sets defaults. By default, Claude Code is conservative: it allows reads everywhere but requires explicit permission for writes, and it never touches secrets without asking.

You can loosen these rules in .claude/settings.json if you trust Claude Code on your team. For example:

1{2  "permissions": {3    "readOnlyPaths": [],4    "safeWritePaths": ["src/**", "tests/**"],5    "allowSecretAccess": false6  }7}

With this config, Claude Code will automatically write to anything under src/ or tests/ without asking, but will still ask before touching a secret. These rules are per-repository, not global — you can be strict in production code and permissive in internal tools.

Quick reference

  • Always review .claude/settings.json before checking it into source control — decide what level of permission your team trusts.
  • Set readOnlyPaths to protect sensitive files (e.g., API keys, database migrations) from reads even.
  • Use safeWritePaths to whitelist directories where Claude Code can write without asking (e.g., test fixtures, generated code).
  • Keep allowSecretAccess false unless your task specifically needs it; let Claude Code ask each time instead.
  • On first use, accept "ask every time" — once you're comfortable, update .claude/settings.json to require fewer confirmations.

Remember this

Permissions start conservative to keep you safe; adjust per-repository based on trust and workflow, but keep sensitive files protected.

Next steps after your first session

After your first task, you've learned the basic loop: describe what you want → Claude Code reads files → shows diffs → applies changes → runs tests → reports results. From here:

For deeper understanding: Read How Claude Code Works to learn about context compaction, subagents, and why the agent loop is designed the way it is.

For extending Claude Code: Add MCP (Model Context Protocol) servers to connect to databases, APIs, or monitoring tools. Start with MCP Integration: Connect Claude Code to External Tools.

For advanced workflows: Explore Claude Code Workflow to learn about skills, hooks, and how to integrate Claude Code into your team's CI/CD pipeline.

For troubleshooting: Check Claude Code Permissions if you hit unexpected permission denials, and Claude Code Context Window if your sessions start running out of memory.

Quick reference

  • Context compaction happens automatically as your session grows — Claude Code summarizes old context to keep memory fresh for the current task.
  • Subagents are useful when you need to search a large codebase in parallel (e.g., find all call sites of a function across 100+ files).
  • Hooks let you enforce policy without slowing down Claude Code — block commits to main, require tests to pass, or notify your team when deployments complete.

Remember this

Your first task is the foundation; the ecosystem grows from there with MCP integrations, team workflows, and production automation.

Key takeaway

Claude Code is the same agent loop across five interfaces — CLI, VS Code, Desktop, Web, Mobile — so the core workflow is identical: describe, read, confirm, execute, verify. Your first 30 minutes should be spent on a concrete, testable task in your actual repository, not on reading documentation. Start with the platform that fits your daily work (Desktop if you're new, CLI if you're in the terminal already, VS Code if you live there, Web if you're remote), initialize your repository, and pick a small bug to fix. Review the diffs, let it run your tests, and see what changed. That's agentic coding.

Try it now: open your repository in Claude Code, paste this task, and watch: "Find every instance of console.log in src/, replace with the team's logger instance, and run the test suite." You'll see the loop in action — search, read, edit, execute, done.

Share:
PK

Polo Khan

Lead Author & Systems Architect

Software engineer and distributed systems architect specializing in backend scalability, cloud-native infrastructure, databases, and AI engineering workflows. Author and maintainer of Core Concept Learning.

Human-Engineered & Fact-CheckedOriginal Visual DiagramsEditorial Standards →Send Feedback

Related Articles

Open a chat with an LLM and ask it to fix a bug, and the best you get back is a suggested diff you copy into your editor

Read

Copilot vs Agent is for builders who need the term to survive contact with real products, tools, and failure modes. The

Read

Human-in-the-Loop Design Patterns for AI Agents is for builders who need the term to survive contact with real products,

Read

Keep learning

Follow a structured path or browse all courses to go deeper.