Using the OpenCode Agent
Harry
· 13 Sep 2026
· 4 views
Starting a Session
Type a task in plain language and the agent works through it: reading relevant files, making edits and running commands. Its transcript stays visible in the terminal so you can follow every action.
Agents and Subagents
OpenCode ships with agents for different jobs:
- build - The default agent for implementing changes.
- plan - Investigates a task and returns a plan without editing.
- general - A flexible subagent for delegated research or fixes.
- explore - Quickly finds files and answers codebase questions.
Help and Commands
Type /help inside the session to list built-in commands. You can also define your own slash commands, skills and permission rules in .opencode files.
Staying in Control
Answer prompts as they appear, approve tool use, and reopen previous sessions any time. Everything runs locally and uses the API credentials you connected.
Key Points
- Describe tasks in natural language in the terminal.
- Use build, plan, general and explore for different jobs.
- Type /help to discover commands.
- Your keys and sessions stay under your control.