Configuration

VS Code settings

Configure Cortex in VS Code Settings (search for “Cortex”). Settings live under the cortex.* namespace — they are not a project config.json.

SettingDefaultDescription
cortex.opencodeBinary "opencode" Path to the OpenCode CLI binary
cortex.opencodePort 4096 Local port for opencode serve
cortex.agent "build" Default OpenCode primary agent (e.g. build, plan)
cortex.providerID "opencode" Preferred OpenCode provider id
cortex.modelID "big-pickle" Preferred model id within that provider
cortex.modelMode "auto" auto / turbo / manual model selection
cortex.routing.useAllConnectedProviders false If true, Auto/Turbo may use any OpenCode-connected provider; if false, only cortex.providerID
cortex.context.topK 8 Number of local context chunks injected per prompt
cortex.context.maxChars 12000 Max characters of retrieved context per prompt
cortex.context.embeddings "hash" Embedding backend: hash (offline) or minilm
cortex.context.chunkMode "symbols" Index split mode: symbols (LSP) or lines
cortex.locale "en" Cortex UI language (independent of VS Code display language)

Models via OpenCode

Cortex uses OpenCode as the agentic provider. You choose among the models available on your OpenCode subscription. OpenCode billing is managed outside Cortex and is unrelated to the Cortex license.

OpenCode may also use its own config (for example ~/.config/opencode/opencode.json) for agent permissions and defaults. That is OpenCode configuration, separate from Cortex VS Code settings.

Context sources

Cortex automatically gathers context from: