OpenCode

A command-line client for running OpenCode agent sessions without a graphical interface. It keeps each session's state while you work.

In plain words
What is it for?
Use it to launch OpenCode from scripts or other tools, then continue the same agent session across multiple interactions.
Why use it?
It lets another program start and continue OpenCode sessions through the Agent Client Protocol, a standard way for software to communicate with coding agents.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/openclaw/acpx/opencode
Clone the repo
git clone --depth 1 https://github.com/openclaw/acpx
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 38 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00038
Opus 5 $0.00000 $0.00019
Sonnet 5 $0.00000 $0.00008
Haiku 4.5 $0.00000 $0.00004

Measured 2d ago against content hash 2ef3330df3bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

OpenCode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/OpenCode.md · 6 lines

What it actually says

OpenCode

  • Built-in name: opencode
  • Default command: npx -y opencode-ai acp
  • Upstream: https://opencode.ai
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 6 lines · 0 tokens per session scan A 2ef3330df3bc

Subscribe to this mod's changes

OpenCode is an agent published in the GitHub repository openclaw/acpx (3,194 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 38 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

code-quality-reviewer

Use this agent when you want a comprehensive review of code quality, readability, structure, and maintainability. This agent focuses on how well-written and organized code is — not on bugs, logic errors, or functional correctness. It examines file length, function complexity, naming conventions, code organization…

OpenSource03/harnss · 328 tokens

refactor-analyst

Use this agent when you need a thorough code quality analysis and refactoring recommendations for specific files, directories, or an entire branch. This agent reads code deeply, questions every pattern, checks for modern best practices, and produces a detailed report — without making any changes.\n\nExamples:\n\n…

OpenSource03/harnss · 437 tokens

typescript-type-reviewer

Use this agent when you need a thorough review of TypeScript type definitions, type usage patterns, and type architecture in recently written or modified code. This includes checking for type duplicates, unnecessary custom type copies that should be imported from libraries, improper type assertions, overly broad…

OpenSource03/harnss · 324 tokens

perf-deep-audit

Use this agent when you need a deep performance review of Electron, React, or Vite-related code — especially for large renders, long chat histories, streaming updates, memory leaks, IPC bottleneck analysis, or general app sluggishness investigations. This agent reviews and diagnoses only; it does not edit…

OpenSource03/harnss · 299 tokens

docs-researcher

Use this agent when the user needs information from project documentation files, SDK docs, protocol specs, or any @docs prefixed directories. This includes questions about API usage, SDK methods, protocol details, configuration options, type definitions, or architectural decisions documented in the codebase. The agent…

OpenSource03/harnss · 366 tokens

clean-code-refactor

Use this agent when you need to refactor existing code, rewrite a module for better maintainability, decompose a large file into focused sub-modules, eliminate duplication, improve type safety, optimize performance, or generally elevate code quality. This agent goes beyond the minimum ask — it proactively identifies…

OpenSource03/harnss · 369 tokens