---
title: "Get global configuration"
method: GET
path: "/global/config"
---

# Get global configuration

`GET /global/config`

Retrieve the current global OpenCode configuration settings and preferences.

## Response `200`

Get global config info

- Config
  - `$schema` string — JSON schema reference for configuration validation
  - `shell` string — Default shell to use for terminal and bash tool
  - `logLevel` 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' — Log level
  - `server` ServerConfig — Server configuration for opencode serve and web commands
    - `port` integer — Port to listen on
    - `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` object — Command configuration, see https://opencode.ai/docs/commands
  - `skills` object — Additional skill folder paths
    - `paths` string[] — Additional paths to skill folders
    - `urls` string[] — URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)
  - `watcher` object
    - `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[]
  - `share` 'manual' | 'auto' | 'disabled' — Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
  - `autoshare` boolean — @deprecated Use 'share' field instead. Share newly created sessions automatically
  - `autoupdate` union — Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
    - boolean
    - 'notify'
  - `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` object — @deprecated Use `agent` field instead.
    - `build` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
    - `plan` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
  - `agent` object — Agent configuration, see https://opencode.ai/docs/agents
    - `plan` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
    - `build` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
    - `general` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
    - `explore` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
    - `title` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
    - `summary` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
    - `compaction` AgentConfig
      - `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` object — @deprecated Use 'permission' field instead
      - `disable` boolean
      - `description` string — Description of when to use the agent
      - `mode` 'subagent' | 'primary' | 'all'
      - `hidden` boolean — Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
      - `options` object
      - `color` union — Hex color code (e.g., #FF5733) or theme color (e.g., primary)
        - string
        - 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'error' | 'info'
      - `steps` integer — Maximum number of agentic iterations before forcing text-only response
      - `maxSteps` integer — @deprecated Use 'steps' field instead.
      - `permission` union
        - 'ask' | 'allow' | 'deny'
        - object
          - `read` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `edit` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `glob` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `grep` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `list` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `bash` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `task` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `external_directory` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `todowrite` 'ask' | 'allow' | 'deny'
          - `question` 'ask' | 'allow' | 'deny'
          - `webfetch` 'ask' | 'allow' | 'deny'
          - `websearch` 'ask' | 'allow' | 'deny'
          - `codesearch` 'ask' | 'allow' | 'deny'
          - `lsp` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
          - `doom_loop` 'ask' | 'allow' | 'deny'
          - `skill` union
            - 'ask' | 'allow' | 'deny'
            - PermissionObjectConfig
      - `subAgents` string[], nullable — Restrict which subagents this agent may invoke via the task tool. Empty/null = no restriction.
      - `skills` string[], nullable — Restrict which skills this agent may load via the skill tool. Empty/null = no restriction.
  - `provider` object — Custom provider configurations and model overrides
  - `mcp` object — MCP (Model Context Protocol) server configurations
  - `formatter` union
    - boolean
    - object
  - `lsp` union
    - boolean
    - object
  - `instructions` string[] — Additional instruction files or patterns to include
  - `layout` 'auto' | 'stretch' — @deprecated Always uses stretch layout.
  - `permission` union
    - 'ask' | 'allow' | 'deny'
    - object
      - `read` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `edit` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `glob` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `grep` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `list` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `bash` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `task` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `external_directory` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `todowrite` 'ask' | 'allow' | 'deny'
      - `question` 'ask' | 'allow' | 'deny'
      - `webfetch` 'ask' | 'allow' | 'deny'
      - `websearch` 'ask' | 'allow' | 'deny'
      - `codesearch` 'ask' | 'allow' | 'deny'
      - `lsp` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
      - `doom_loop` 'ask' | 'allow' | 'deny'
      - `skill` union
        - 'ask' | 'allow' | 'deny'
        - PermissionObjectConfig
  - `tools` object
  - `enterprise` object
    - `url` string — Enterprise URL
  - `tool_output` object — Thresholds for truncating tool output. When output exceeds either limit, the full text is written to the truncation directory and a preview is returned.
    - `max_lines` integer — Maximum lines of tool output before it is truncated and saved to disk (default: 2000)
    - `max_bytes` integer — Maximum bytes of tool output before it is truncated and saved to disk (default: 51200)
  - `compaction` object
    - `auto` boolean — Enable automatic compaction when context is full (default: true)
    - `prune` boolean — Enable pruning of old tool outputs (default: true)
    - `tail_turns` integer — Number of recent user turns, including their following assistant/tool responses, to keep verbatim during compaction (default: 2)
    - `preserve_recent_tokens` integer — Maximum number of tokens from recent turns to preserve verbatim after compaction
    - `reserved` integer — Token buffer for compaction. Leaves enough window to avoid overflow during compaction.
  - `experimental` object
    - `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
  - `artifact_allowed_paths` string[] — 允许创建 artifact 的文件路径前缀白名单。路径将被 resolve 为绝对路径后进行前缀匹配。默认允许 /tmp 路径。
  - `custom_provider_npm_whitelist` string[] — 自定义 provider 允许加载的 npm 包白名单。

---

[API](https://skmtc.net/kaaass/apis/opencode.md) · [All operations](https://skmtc.net/kaaass/apis/opencode/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kaaass/opencode/versions/8bb9a15bd144/schema)
