# Config (OpenCode V2) Create opencode.jsonc in your project. Add schema for validation. Locations: - System: /etc/opencode (Linux), /Library/Application Support/opencode (macOS), %ProgramData%\opencode (Windows) - Global: ~/.config/opencode/opencode.jsonc - Project: ./opencode.jsonc or ./.opencode/opencode.jsonc Key fields: - model: default model in provider/model format. - default_agent: primary agent. - update: disable/notify/auto. - permissions: ordered allow/deny/ask rules. - policies: allow/deny provider.use, tool.use, etc. - agents: override/define agents. - snapshots, watcher, formatter, media, tool_output, websearch, mcp, compaction, warming, skills, commands, instructions, references, worktree, plugins, providers. - experimental: todo, subagent_depth, background_compaction, image_generate, location_idle_timeout. Variables: {env:VAR}, {file:path}. MCP config: mcp.servers (not top-level server names). disabled: true to keep configured without connecting.