Service
These values control how Mattermost reaches your OpenCode server.
service.base_url: OpenCode server base URLservice.username: Basic Auth usernameservice.password: Basic Auth passwordservice.allow_hosts: optional comma-separated allow list
Runtime
runtime.default_timeout_seconds: default request timeoutruntime.enable_streaming: enable SSE-backed post updatesruntime.streaming_update_ms: post refresh cadenceruntime.context_post_limit: number of recent Mattermost posts injected as contextruntime.max_input_lengthandruntime.max_output_length: prompt and response guardrailsruntime.enable_usage_logs: structured diagnostics for operations
OpenCode Defaults
Use opencode_defaults.provider_id, opencode_defaults.model_id, and opencode_defaults.agent_id to define global fallbacks when a bot does not override them.
Session Policy
session_policy.reuse_scope:thread,dm, orchannelsession_policy.idle_expire_minutes: replace inactive sessions after the configured idle window
Bot Definitions
Each bot can define its own display name, prompt, model, agent, access control rules, tool policy, and mode.
Conversation Mode
Use for summaries, drafting, support, and general assistant workflows that do not need coding-specific UI.
Coding Mode
Use for project-aware development help, task cards, command approval, and session diff review.
Coding Settings
coding.profile: semantic role such asimplementerorreviewercoding.workspace_root: optional OpenCode project-relative working directory hintcoding.allowed_paths: restrict surfaced project pathscoding.command_allowlist: approved command prefixescoding.require_command_approval: require an explicit user action before executioncoding.include_workspace_snapshotandcoding.include_referenced_files: prompt enrichment controls