Skip to content

OpenCode and Pi

OpenCode JSON is installer-rendered; Pi settings and models are chezmoi-rendered. Both may use local MLX on macOS and declared cloud defaults on Linux, so inspect generated configuration before assuming a model or connection.

HarnessSourcesTargetCheck
OpenCodetemplate, AGENTS, installer~/.config/opencode/opencode.jsonbash ~/dotfiles/install/opencode.sh check
Pisettings, models, AGENTS~/.pi/agent/pi --version

The macOS endpoint is http://localhost:8080/v1 and must run separately. Credentials and interactive login are separate from checked-in configuration; do not use /login to diagnose an endpoint.

Cloud pins live in home/.chezmoidata.toml. Checked against the Anthropic model catalog on 2026-10-28: OpenCode plans with Fable 5.1, reviews with Sonnet 5.5, and uses Haiku 5.5 for small tasks and Linux builds. Pi uses Haiku 5.5 with thinking off on Linux. Both retain local Qwen3.6-27B on macOS.

OpenCode sync preserves existing model choices. When upgrading an existing configuration, deliberately update its small_model and agent.plan.model / agent.review.model values, then start a new session. A source pin change alone does not replace those saved choices.

Refresh an old OpenCode model catalog with opencode models --refresh. Confirm the expected model IDs are present; a refresh message alone does not establish Anthropic authentication or generation access. See the models command.

The sync renders registry servers, preserves allowed runtime choices, and creates core plus research, browser, creative, desktop, cloud, workspace, math, and repository agents.

OpenCode scopes agents by MCP namespace

packages/mcp-servers.txt

install/opencode.sh

chezmoi template

opencode.json

core build/plan

matching domain agent

read-only review

Wide diagrams scroll horizontally. Focus the figure to use arrow keys.

review denies edit/task and has a small Bash allowlist (git diff, git log, git show, rg, fd); it is for reviewing a change, not deployment validation or host isolation. sync-config writes configuration; check parses and reports MCP count without reconciling. Start a new session after a sync.

Extensions are adapters, not a new policy engine

Section titled “Extensions are adapters, not a new policy engine”
ExtensionEventEffectLimit
chezmoi-guard.tsedit/writeasks df-chezmoi-guard about path/patchunavailable guard fails open
rtk.tsshell/Bashapplies known rtk rewrite resultunknown/failed rewrite passes through

OpenCode’s git-context.ts shows status and five recent commits at session start; it is context, not worktree inspection. Pi probes both helpers at load; its RTK path enforces the documented minimum version and honors RTK_DISABLED=1. Neither adapter makes a token-reduction claim; see agent overhead.

Inspect opencode logs or client diagnostics, then generated JSON, before changing sources. For a missing local endpoint, follow the local-model route; for absent MCP scope, deliberately sync, inspect namespaces, and start a new session. Managed settings suppress automatic sharing/updates, but they do not authenticate services, make external MCPs read-only, or restrain an allowed shell command. Check current OpenCode configuration and Pi documentation before schema changes.