Skip to main content
The opencode_local adapter runs OpenCode locally. It supports multi-provider routing in provider/model format and session resume across heartbeats via --session.

Prerequisites

  • OpenCode CLI installed (opencode command available)
  • At least one provider API key configured (OpenCode reads from its own config)

Configuration Fields

Session Persistence

The adapter stores a session ID after each run and resumes with --session on the next heartbeat when the stored session’s working directory matches the current cwd. A new session starts when the directory changes.

Skills Injection

AoA injects skills by materializing them to disk before execution. Skills files are required to be present on the filesystem before OpenCode starts (requiresMaterializedRuntimeSkills: true).

Models

Run opencode models to list all available models in provider/model format. Models are discovered dynamically at runtime — static fallbacks are not provided. If discovery is unavailable, the models list for this adapter may be empty.

Invocation

Runs are executed as:

Environment Test

The environment test checks:
  • OpenCode CLI is installed and accessible
  • Working directory is valid
  • Authentication signal for the configured provider
  • A live hello probe to verify CLI readiness