Chapter 2 of 6 · 20 min
Your First Session
OpenCode is installed. Let's use it for real.
Launching in a Project
Open your terminal and go to a folder you're actually working on, then start OpenCode there:
practice terminal · nothing runs here
$ cd ~/your-project
OpenCode can now read the files in this folder. It reads what it needs as it goes, and it can change files directly.
No code project? Any folder with real work in it will do: notes, exported CSVs, a draft report. Text files, CSVs and PDFs work best. OpenCode can't open Excel or Word files directly, so save a copy as CSV or PDF first.
Whatever it reads goes to the model's provider. The provider of the free model you picked keeps none of it, but if your company limits which AI services may see its files, use a folder without company data until you've checked; chapter 6 shows how.
Checkpoint
Choosing a Model
The free model you picked in setup can do everything in this chapter: read your files, run commands and tell you what it did. Type /models to check or switch; OpenCode remembers your pick.
On long or high-stakes tasks a paid model does better. If you connected Claude (the note at the end of Setup), start with Claude Opus 5.5: Anthropic's own advice is to start there for most work, and it is built for long-running agentic coding and knowledge work.
| Model | Best For | Speed | Cost |
|---|---|---|---|
| Claude Opus 5.5 | Long tasks, multi-file changes, careful analysis | Moderate | Higher |
| Claude Sonnet 5.5 | Daily tasks, quick edits, explanations | Fast | Lower |
Switch to Sonnet when you want speed over depth. The list also shows older Claude models and Claude Fable 5.1, Anthropic's model for the hardest reasoning: slower, pricier, and not needed for this path. Prices: https://platform.claude.com/docs/en/about-claude/pricing
Try Something Real
Don't start with "hello world." Give it a real task from your actual work. Point it at a project and ask it to explain itself. Practise the prompt here first:
opencode · practice
› What does this project do? Explain in simple terms and how to run it.
It reads the actual files - package.json, README.md, the source - and gives you a grounded answer, not a guess.
Notice what happened: it read the real files and told you what the project is, its tech stack, how to run it, and even flagged an unused dependency. No copy-pasting. Your answer will be about your own folder; if it isn't code, ask: "What's in this folder? Summarise each file in one line."
Checkpoint
Let It Run Things For You
OpenCode can run commands too, not just read and write files. Ask it to start the project:
opencode · practice
› Run this project locally for me and open it in a browser.
It checks the port, starts the dev server, waits until the server responds, and opens your browser.
Seconds later, the app is running in front of you - in this case, a browser game called Space Pong. Here it is, live:
Nothing in your folder to run? Ask it to make something you can open: "Turn the files in this folder into a one-page summary, save it as a web page, and open it in my browser."
You didn't touch the terminal yourself. You described what you wanted, and the agent handled the commands, the waiting, and the browser. This is the shift: you direct, it executes.
Checkpoint
Understanding the Output
OpenCode doesn't just give you text. It:
- Reads files - it shows which files it examined
- Edits files - it shows diffs of what it changed
- Runs commands - it runs terminal commands itself and shows each one
- Asks questions - it can stop and ask when something is unclear. It doesn't always, so tell it: "Ask me before you guess."
You see each file it reads or changes and each command it runs.
Sessions and History
Every conversation with OpenCode is a session. Sessions persist - you can come back to them later.
To see your past sessions, type /sessions (or press Ctrl+X, then L). Pick one to switch to it.
Pro tip: the "general" folder
Remember the ~/ai-sessions folder from setup? Here's why it matters.
When you run OpenCode in a specific project folder, sessions are tied to that folder. When you run it in ~/ai-sessions, all your general questions, brainstorming, and quick analyses live in one place.
This means:
- Project-specific work stays with the project
- General sessions (research, planning, quick questions) are all findable in one place
- You can easily scroll back through past conversations using
/sessions
What Just Happened
You now have an AI agent that:
- Can read any file in your project
- Can write and change files, and run commands
- Keeps each conversation as a session you can reopen
- Runs in your terminal (no browser tabs, no context switching)
But right now it starts every session from scratch. It doesn't know your preferences, your team's conventions, or your coding style. That's what the next chapter fixes.
Stuck? Paste the error into OpenCode.
~/essentials $ path --status
0/7 free checkpoints done · 10 more in chapters 3-6
Finish the checkpoints above, then keep going.
The rest of the path turns a capable agent into your agent: skills that remember how you work, direct access to docs and repos, and your first one-sentence workflow.
- ✓Skills · 20 min
- ✓Stop Being the Copy-Paste Middleman · 20 min
- ✓Build Your Own Workflow · 35 min
- ✓Take It to Work · 35 min
- ✓ Starter kit: 5 ready-to-use skills
- ✓ PDF edition, updated when the tools change
English
Language
Remembered on this device with a cookie.