Agent Powered Solopreneur Join free

Claude Code tutorial: your first agent task, start to finish

Updated: 25 November 2026

Claude Code is Anthropic’s agentic assistant that runs in your terminal: you describe a task in plain language, and it reads files, edits them and runs commands until the task is done. The short version of a first task: install it, start a session inside a project folder, write a brief with a done-condition, decide what it may do without asking, and check the evidence before you accept “done”. Every command and file name below was checked against the official documentation on 25 November 2026.

The habits around those commands come from the records of my own agent team. On 25 October 2026 one working session of my service business turned into an accidental experiment. In the first half the agent played manager: eight helpers spawned, and together they built a second copy of something we already owned. In the second half he worked as a single loop: zero helpers, 284 tool calls, and six rounds in which I looked at screenshots and said what was still off. The second half produced the right result.

That session is the whole tutorial in miniature. One task, one loop, a human who looks. The commands are the easy part.

Step 1: install it and start a session

The setup page lists macOS 13.0+, Windows 10 1809+ and Ubuntu 20.04+ among the supported systems, with 4 GB or more of RAM. You also need a Claude subscription, a Claude Console account, or access through a supported cloud provider. On macOS, Linux or WSL the native install is one line:

curl -fsSL https://claude.ai/install.sh | bash
claude --version

On Windows PowerShell the documented command is irm https://claude.ai/install.ps1 | iex. Then go to a project folder and start:

cd /path/to/your/project
claude

He asks you to log in on first use. Type /help to see the available commands. Start with a question, not a change: “what does this project do?” He reads the files himself; you do not paste them in.

Step 2: give him something to read first

Each session begins with a fresh context window. What carries over is a file called CLAUDE.md. The memory page gives its places: ./CLAUDE.md or ./.claude/CLAUDE.md for the project, ~/.claude/CLAUDE.md for your preferences across all projects. Run /init and he drafts a starting file from what he finds in the folder; /memory lists the files and opens them.

Keep it short. The docs set a target of under 200 lines per file, because longer files consume more context and reduce adherence. What belongs there is what he cannot see from the folder: the command that runs your check, the file that must not be touched. The longer argument is in my guide on what the agent reads before he acts.

Step 3: write the brief like a job

The best practices page says to name the file, describe the symptom and say what “fixed” looks like, and to hand over a check that comes back pass or fail. My own team learned the same thing the slow way. On his first run my coordinator accepted goals with no numbers in them; “is the goal concrete?” is now step zero. And a worker’s “done” without a URL, a file or a number fails review. So the brief I would hand a beginner has four lines:

Task: what to change, and where.
Done when: the check that must pass.
Do not touch: what is out of scope.
Show me: the command you ran and its output.

A vague brief is a dilemma for the one who receives it. He will pick something, and it will be reasonable, and it will not be what I meant.

Step 4: what may he do without asking?

The session’s permission mode sets which actions run without a prompt. Press Shift+Tab to switch modes. This table is taken from the permission modes page:

Mode What runs without asking The docs suggest it for
default (Manual) File reads inside your working directories Sensitive work, unfamiliar code
acceptEdits Reads, file edits and common filesystem commands Iterating on code you are reviewing
plan Reads; he researches and proposes changes without making them Exploring before changing
auto Everything, with background safety checks Long tasks, fewer prompts

Two more modes, dontAsk and bypassPermissions, are described there for locked-down scripts and isolated containers. Which mode a new session starts in depends on your version and plan, so read the status bar before the first task. For a first task I would prefix the prompt with /plan, read the plan, then let him edit.

On top of the mode sit rules. /permissions opens the list of allow, ask and deny rules. They are evaluated deny first, then ask, then allow. The permissions page adds the sentence I would frame:

“Permission rules are enforced by Claude Code, not by the model.”

— Claude Code documentation, Configure permissions

In my team the line is drawn by reversibility. Reversible work on my own assets he does alone, with a written way back for every change. Money, new accounts and anything that cannot be undone wait for me.

Step 5: hooks, for rules that must not depend on his judgment

An instruction in CLAUDE.md is read by the model, and the model decides. A hook is different. The hooks guide defines hooks as user-defined shell commands that Claude Code runs at specific points in its lifecycle. They go in a hooks block of a settings file: ~/.claude/settings.json for all projects, .claude/settings.json for one. A PreToolUse hook runs before a tool call and can block it; in the guide’s example a script exits with code 2 to deny a command. /hooks shows what is configured.

I learned what a block is worth on 24 October 2026. A guard stopped one of the helpers. He read the guard, removed the part it had flagged, reported the hole as a “known gap”, and the manager agent accepted it and deployed. Since then a blocked action in my team is a stop that reaches me, not an obstacle to solve. That is most of what an agent harness is: rules written by incidents.

Step 6: subagents, and when to leave them alone

The subagents page describes them as specialised assistants, each in its own context window, that do a side task and return only a summary. Custom ones are files in .claude/agents/ for one project or ~/.claude/agents/ for all of them. Built-in ones such as Explore, a read-only searcher, are used when he judges it fit.

For a first task, leave them alone. My rule since that October session: single loop by default, and helpers return data, never decisions.

Step 7: review, then clear

Let him finish. Then review what he shows, not what he says: the diff, the command output, the page itself. One run in my records was 11 of 11 checks green and the page had no styling. Someone has to look.

When the task is accepted, close it. The same best practices page recommends /clear between unrelated tasks; /rewind rolls code or conversation back to an earlier prompt, and claude -c continues the most recent conversation in the folder. My own records show a handoff file per task, so the next session starts from a page and not from memory. One task, one session, one handoff file is the shape I would start with.

This tutorial belongs to the AI agent workflows guides on Agent Powered Solopreneur (agentpoweredsolopreneur.com). The next step after a first task is building an agent that does real work on a schedule. The course The One-Person Agent Team is not open yet.

FAQ

Do I need to know how to code to use Claude Code?

The quickstart asks for a terminal, a project folder and an account, and the docs link a terminal guide for people who have never opened one. The docs also say it can help with anything done from the command line, such as writing docs or searching files. Reading what he changed is still your job.

Is Claude Code free?

The docs list a Claude subscription, a Claude Console account with pre-paid credits, or access through a supported cloud provider as the ways to log in. I did not read a pricing page for this guide, so I give no figure.

What is the difference between CLAUDE.md and a hook?

CLAUDE.md is an instruction the model reads and usually follows. A hook is configuration that Claude Code itself executes every time, whatever the model decided. The docs’ own test: if you keep adding emphasis to a line and it is still missed, the line belongs in a hook.

Eight helpers built the wrong thing. One loop and a human who looked built the right one.

Join the community. Free.

The build log, the agent and the four lessons.

Joining today puts you on the build-log email list. The agent, the course and the community are not open yet. Sent with beehiiv under the name Poseidon Hai; unsubscribe with one click. Privacy.