Type object
File match opencode.json opencode.jsonc **/.opencode/opencode.json **/.opencode/opencode.jsonc
Schema URL https://catalog.lintel.tools/schemas/schemastore/opencode/latest.json
Source https://opencode.ai/config.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

$schema string

JSON schema reference for configuration validation

logLevel string

Log level

Values: "DEBUG" "INFO" "WARN" "ERROR"
server object

Server configuration for opencode serve and web commands

5 nested properties
port integer

Port to listen on

max=9007199254740991exclusiveMin=0
hostname string

Hostname to listen on

mdns boolean

Enable mDNS service discovery

mdnsDomain string

Custom domain name for mDNS service (default: opencode.local)

cors string[]

Additional domains to allow for CORS

command Record<string, object>

Command configuration, see https://opencode.ai/docs/commands

skills object

Additional skill folder paths

2 nested properties
paths string[]

Additional paths to skill folders

urls string[]

URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)

watcher object
1 nested properties
ignore string[]
snapshot boolean

Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.

plugin string | array[]
share string

Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing

Values: "manual" "auto" "disabled"
autoshare boolean

@deprecated Use 'share' field instead. Share newly created sessions automatically

autoupdate boolean | string

Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications

disabled_providers string[]

Disable providers that are loaded automatically

enabled_providers string[]

When set, ONLY these providers will be enabled. All other providers will be ignored

model string

Model to use in the format of provider/model, eg anthropic/claude-2

small_model string

Small model to use for tasks like title generation in the format of provider/model

default_agent string

Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.

username string

Custom username to display in conversations instead of system username

mode Record<string, object>

@deprecated Use agent field instead.

2 nested properties
build Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
plan Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
agent Record<string, object>

Agent configuration, see https://opencode.ai/docs/agents

7 nested properties
plan Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
build Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
general Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
explore Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
title Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
summary Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
compaction Record<string, any>
15 nested properties
model string
variant string

Default model variant for this agent (applies only when using the agent's configured model).

temperature number
top_p number
prompt string
tools Record<string, boolean>

@deprecated Use 'permission' field instead

disable boolean
description string

Description of when to use the agent

mode string
Values: "subagent" "primary" "all"
hidden boolean

Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)

options Record<string, any>
color string | string

Hex color code (e.g., #FF5733) or theme color (e.g., primary)

steps integer

Maximum number of agentic iterations before forcing text-only response

max=9007199254740991exclusiveMin=0
maxSteps integer

@deprecated Use 'steps' field instead.

max=9007199254740991exclusiveMin=0
permission object | string
provider Record<string, object>

Custom provider configurations and model overrides

mcp Record<string, object | object | object>

MCP (Model Context Protocol) server configurations

formatter boolean | object
lsp boolean | object
instructions string[]

Additional instruction files or patterns to include

layout string

@deprecated Always uses stretch layout.

Values: "auto" "stretch"
permission object | string
tools Record<string, boolean>
enterprise object
1 nested properties
url string

Enterprise URL

compaction object
3 nested properties
auto boolean

Enable automatic compaction when context is full (default: true)

prune boolean

Enable pruning of old tool outputs (default: true)

reserved integer

Token buffer for compaction. Leaves enough window to avoid overflow during compaction.

min=0max=9007199254740991
experimental object
6 nested properties
disable_paste_summary boolean
batch_tool boolean

Enable the batch tool

openTelemetry boolean

Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)

primary_tools string[]

Tools that should only be available to primary agents.

continue_loop_on_deny boolean

Continue the agent loop when a tool call is denied

mcp_timeout integer

Timeout in milliseconds for model context protocol (MCP) requests

max=9007199254740991exclusiveMin=0