DeveloperHA / AI agents / OpenCode
Open-source terminal coding agent · CLI agents

OpenCode

Learn how OpenCode fits when you want a terminal UI, non-interactive runs or a local server surface with model/provider choice under your control.

Made by OpenCode projectSeparate agent guideReviewed 2026-09-26Model ≠ harness ≠ orchestrator
Scope note This is an independent guide to a third-party project or a developer concept. Installation commands, feature boundaries, plans, model availability and security defaults change. Follow the official source links before using it with private code, credentials or automation.

What it is and who makes it

A terminal-native coding agent with interactive and scripted surfaces, provider configuration and an open-source workflow.

Maker or project: OpenCode project. Classification: Open-source terminal coding agent; this page treats the surrounding context, tools, permissions and verification as the relevant harness boundary.

1
Start the terminal UI in a project.

Start the terminal UI in a project.

2
Use the configured provider and agent mode to inspect, plan or change files.

Use the configured provider and agent mode to inspect, plan or change files.

3
Run non-interactive commands for bounded automation where the exit and output contract is clear.

Run non-interactive commands for bounded automation where the exit and output contract is clear.

4
Review diffs and tests as the acceptance boundary.

Review diffs and tests as the acceptance boundary.

Who it may fit

Pick an agent by its control surface and trust boundary, not only by its model label.

Useful scenarios

  • Open-source and terminal-native workflows
  • Developers who want to switch providers or models
  • Interactive sessions that can later be scripted or served

Trade-offs and checks

  • OpenCode project identity, releases and commands can move quickly; verify the official docs and repository before scripting it.
  • Headless or server modes need authentication and network controls, just like any internal service.
  • Model/provider portability does not guarantee identical tool-call or structured-output behavior.

Interactive vs headless and CI

These modes change the approval, identity and observability boundary.

The TUI is interactive. The documented run, server/web and protocol surfaces support scripts or headless clients; configure authentication, binding, permissions and machine-readable output rather than scraping terminal text.

Request-to-verification workflow

Use this mental model when debugging a surprising edit, tool call or cost.

Input

Intent + context

Your prompt, repository instructions, selected files, history and environment become model context.

Action

Tool + permission

The harness proposes a read, edit, shell, web, MCP or other action; policy decides whether it can run.

Feedback

Result + verification

Command output, compiler errors, tests and your review return to the loop before acceptance.

Setup outline

Start with the smallest safe experiment, then follow the current official documentation for the real installation.

1
Use the current official OpenCode installation guide.
2
Configure one provider and run a read-only exploration task.
3
Test `run` or server modes separately from interactive work.
4
Set authentication and network binding explicitly if using a server surface.
Illustrative workflow
# Follow the current official install guide
curl -fsSL https://opencode.ai/install | bash

cd your-project
opencode

# Non-interactive workflow
opencode run "List the failing tests; do not edit files."

Instructions, skills, MCP and hooks

These surfaces can shape context or add actions; they are part of the trust boundary.

OpenCode has project/global configuration and documented agent, MCP, plugin and server surfaces. Check which instruction file and permission settings apply to the current directory before running a shared repository configuration.

Security and isolation checklist Use a disposable branch or worktree; keep secrets outside the readable path; require approval for writes, shell, network and deployment actions; inspect commands before allowing them; constrain server bindings; review MCP servers, plugins, skills, hooks and instruction files; and run tests independently of the agent's own summary.

Official sources

Use these sources for current installation, capabilities, plans, releases and security notices.

Reviewed 2026-09-26. This date is a change-tracking note, not a promise that the product remains unchanged.

Related learning

Related agent guides

Want the foundations behind the workflow?

Study AI fundamentals, prompt design, AI-assisted development, agents and MCP without a forced linear course.

Open AI learningAI tools