OpenCode and Pi
Start with the generated configuration
Section titled “Start with the generated configuration”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.
| Harness | Sources | Target | Check |
|---|---|---|---|
| OpenCode | template, AGENTS, installer | ~/.config/opencode/opencode.json | bash ~/dotfiles/install/opencode.sh check |
| Pi | settings, 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.
OpenCode scopes agents by MCP namespace
Section titled “OpenCode scopes agents by MCP namespace”The sync renders registry servers, preserves allowed runtime choices, and creates core plus research, browser, creative, desktop, cloud, workspace, math, and repository agents.
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”| Extension | Event | Effect | Limit |
|---|---|---|---|
chezmoi-guard.ts | edit/write | asks df-chezmoi-guard about path/patch | unavailable guard fails open |
rtk.ts | shell/Bash | applies known rtk rewrite result | unknown/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.
Recovery and limits
Section titled “Recovery and limits”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.