opencode
opencode AI coding agent configuration file
| 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
Properties
JSON schema reference for configuration validation
Log level
Server configuration for opencode serve and web commands
5 nested properties
Port to listen on
Hostname to listen on
Enable mDNS service discovery
Custom domain name for mDNS service (default: opencode.local)
Additional domains to allow for CORS
Command configuration, see https://opencode.ai/docs/commands
Additional skill folder paths
2 nested properties
Additional paths to skill folders
URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)
1 nested properties
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.
Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
Disable providers that are loaded automatically
When set, ONLY these providers will be enabled. All other providers will be ignored
Model to use in the format of provider/model, eg anthropic/claude-2
Small model to use for tasks like title generation in the format of provider/model
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.
Custom username to display in conversations instead of system username
@deprecated Use agent field instead.
2 nested properties
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
Agent configuration, see https://opencode.ai/docs/agents
7 nested properties
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
15 nested properties
Default model variant for this agent (applies only when using the agent's configured model).
@deprecated Use 'permission' field instead
Description of when to use the agent
Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
Hex color code (e.g., #FF5733) or theme color (e.g., primary)
Maximum number of agentic iterations before forcing text-only response
@deprecated Use 'steps' field instead.
Custom provider configurations and model overrides
MCP (Model Context Protocol) server configurations
Additional instruction files or patterns to include
@deprecated Always uses stretch layout.
1 nested properties
Enterprise URL
3 nested properties
Enable automatic compaction when context is full (default: true)
Enable pruning of old tool outputs (default: true)
Token buffer for compaction. Leaves enough window to avoid overflow during compaction.
6 nested properties
Enable the batch tool
Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)
Tools that should only be available to primary agents.
Continue the agent loop when a tool call is denied
Timeout in milliseconds for model context protocol (MCP) requests