The outcome
Produce a tested, scoped diff with a clear record of planning, actions, provider use, and human approval.
OpenCode is a open-source AI coding agent for terminal, desktop, and editor workflows. Using plan, build, exploration, and custom agents across repositories while controlling models, commands, edits, external directories, web access, skills, and subagents. This guide narrows that broad capability into one repeatable outcome, with checkpoints that keep the source material and your judgment in the loop.
Before you begin
Set the boundary before the tool starts.
Choose one real task, identify who will use the result, and decide what evidence or test will make the result acceptable. Gather only the source material needed for that task. If the work contains confidential, personal, regulated, or client-owned information, confirm that the platform and account are approved before sharing it.
AI should make the work easier to inspect. If the workflow removes the source, the owner, or the review step, redesign the workflow.
Step by step
A workflow you can repeat.
- 01
Open the intended checkout on a clean branch, record status and baseline checks, and confirm the active provider, model, version, and project configuration.
- 02
Use the plan agent to inspect relevant code and state acceptance criteria, architecture constraints, non-goals, and required validation without edits.
- 03
Review the plan, then configure ask or deny rules for shell commands, edits, external directories, web access, skills, and subagents before using build.
- 04
Monitor every action and changed file, reject scope or dependency drift, and run focused tests while keeping pushes and destructive commands blocked.
- 05
Run trusted checks independently, inspect the full diff and session record, and commit or publish only through the normal human-reviewed workflow.
Working standard
What good use looks like.
- Separate planning from editing.
- Deny external directories by default.
- Keep push and destructive commands blocked.
Provider terms, credential storage, agent definitions, permission syntax, and defaults can change across versions. Pin the version and current documentation, deny secrets and external directories by default, keep shell, edits, web access, skills, MCP tools, and subagents least-privileged, review saved approvals, avoid auto mode on untrusted repositories, bound iterations and cost, and independently verify every change.
Official references
Check the current product documentation.
Features, plan limits, availability, and data controls change. These official pages are the starting points used for this collection.