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 Preferred port for opencode serve; if another workspace owns it, Cortex uses the next free port
cortex.agent "build" Default OpenCode primary agent (e.g. build, plan)
cortex.providerID "opencode" Deprecated offline mirror — default model is OpenCode opencode.json `model`
cortex.modelID "big-pickle" Deprecated offline mirror — prefer OpenCode config / chat picker
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 the OpenCode default model provider
cortex.models.optimizeFor "balance" Auto routing cost vs quality: cost / balance / intelligence
cortex.models.zenBillingEnabled false Unlock paid Zen models in the picker (off by default — no surprise charges)
cortex.models.byokEnabled false Unlock BYOK provider models (OpenAI, Anthropic, etc.)
cortex.context.topK 8 Number of local context chunks injected per prompt
cortex.context.maxChars 16000 Max characters of retrieved context per prompt
cortex.context.embedWeight 0.45 Weight (0–1) for embedding similarity vs lexical match when ranking context
cortex.context.embeddings "hash" Retrieval mode: hash = Performance (fast, offline); minilm = Quality (semantic MiniLM). Quality downloads a native runtime once into ~/.cache/cortex-minilm (not in the VSIX); send stays locked until ready (usually ≤~30s on first index); vectors persist in .cortex/index; later opens only warm the model; file edits re-embed only changed files. Onboarding/chat show a hardware fit tip (Quality adds ~150 MB; concurrency capped on tighter PCs)
cortex.context.chunkMode "symbols" Index split mode: symbols (LSP) or lines
cortex.context.include [] Optional include globs (relative to workspace). Empty = all indexable files
cortex.context.exclude [] Extra exclude globs on top of gitignore
cortex.context.extensionPriority {".ts":1,".tsx":1,".js":0.8,".jsx":0.8,".py":0.9} Per-extension score multipliers for retrieval ranking (higher = preferred)
cortex.autocomplete.enabled true Ghost-text autocomplete via a fast no-tools OpenCode agent
cortex.autocomplete.debounceMs 350 Debounce (ms) before requesting an autocomplete suggestion after typing pauses
cortex.locale "en" Cortex UI language (independent of VS Code display language)
cortex.chat.pinEditorTab true Pin the Cortex chat editor tab and keep it first in its group
cortex.chat.maxOpenTabs 5 Max chat tabs kept open and restored on startup (0 = unlimited)
cortex.chat.maxHistorySessions 100 Max chats listed in History (newest first; 0 = all fetched)
cortex.ui.showHeaderVersion true Show muted extension version next to the Cortex title (turn off for demos)
cortex.ui.showReasoningSummaries true Show thinking / reasoning summary blocks in the chat timeline
cortex.ui.shellToolPartsExpanded true Expand shell/bash tool output blocks by default in the chat timeline
cortex.ui.editToolPartsExpanded true Expand edit/write/patch tool cards by default in the chat timeline
cortex.permissions.autoAccept false Automatically accept OpenCode permission prompts with a one-time allow
cortex.appearance.uiFont "" Optional CSS font-family for Cortex chat UI; empty uses the VS Code UI font
cortex.appearance.codeFont "" Optional CSS font-family for monospace / code in Cortex chat; empty uses the editor font
cortex.notifications.agent false Show a VS Code notification when the agent finishes a turn
cortex.notifications.permissions false Show a VS Code notification when a permission prompt appears
cortex.notifications.errors true Show a VS Code notification on chat errors
cortex.sounds.agent "none" Sound when the agent finishes a turn (none or a Web Audio preset)
cortex.sounds.permissions "none" Sound when a permission prompt appears
cortex.sounds.errors "none" Sound on chat errors
cortex.theme.id "follow" Chat color theme: follow (OpenCode tui.json), cortex, or an OpenCode desktop theme id (GitHub catalog + cache)
cortex.theme.mode "system" Light/dark variant for OpenCode themes; system follows the VS Code color theme kind
cortex.theme.remoteRef "dev" Git ref on anomalyco/opencode used to list official desktop themes
cortex.policy.t0MaxChars 2000 Max characters for Tier T0 (immutable safety / neverDo / hooks)
cortex.policy.t1MaxChars 12000 Max characters for Tier T1 (always-apply rules, AGENTS.md, user rules)
cortex.policy.t2MaxChars 8000 Max characters for Tier T2 (glob-scoped rules, skills, requestable catalog)
cortex.policy.includeCursorRules true Load .cursor/rules into the Policy Brain
cortex.policy.includeCortexRules true Load .cortex/rules into the Policy Brain
cortex.skills.autoInvoke true Auto-inject matching SKILL.md bodies when the turn matches
cortex.skills.topK 2 Max skills fully injected per turn when auto-invoke is on
cortex.hooks.enabled true Run .cortex/hooks.json and built-in changelog gate
cortex.hooks.strict false If true, a failing prePrompt hook denies the turn

Keyboard shortcuts

VS Code keybindings (not OpenCode Desktop). Customize in Keyboard Shortcuts:

ShortcutAction
Ctrl/Cmd+Alt+C Open chat (right editor panel)
Ctrl+Alt+I / Cmd+Alt+Shift+I Inline Edit
Ctrl/Cmd+Alt+\ Trigger ghost-text completion
Ctrl/Cmd+Alt+T Send terminal selection to chat

Command Palette

All Cortex commands are available from the VS Code Command Palette (Ctrl/Cmd+Shift+P). Search for “Cortex”:

CommandDescription
Cortex: Open Session Open the chat panel (right editor group)
Cortex: New Session Start a new chat session
Cortex: Stop Generation Abort the current agent turn
Cortex: Send Terminal Selection to Session Send the selected terminal text to chat
Cortex: Reindex Workspace Rebuild the local codebase index
Cortex: Trigger Inline Completion Request a ghost-text completion now
Cortex: Inline Edit (Ctrl+Alt+I) Inline edit the current selection / file
Cortex: Connect Open Providers to connect OpenCode accounts
Cortex: Connect / Models Open Models (default model, visibility, favorites)
Cortex: Remember preference Save a preference into Policy Brain memory
Cortex: Open rules / memory Open rules and memory files
Cortex: Edit user rules Edit user-level rules
Cortex: Show Policy Inspector Inspect the active Policy Brain tiers for this turn
Cortex: Run Diagnostics Run connectivity and setup diagnostics
Cortex: Show Log Open the Cortex output channel
Cortex: Dump last retrieval Write the last context retrieval dump for troubleshooting
Cortex: Report Issue / Feedback Open the feedback / issue report flow

Models via OpenCode

Cortex uses OpenCode as the agentic provider. You choose among the models available on your OpenCode subscription (Zen free, paid Zen, or OpenCode Go). OpenCode billing is managed outside Cortex and is unrelated to the Cortex license.

Auth and provider keys live in OpenCode’s local store (~/.local/share/opencode/auth.json; on Windows: %USERPROFILE%\.local\share\opencode\auth.json). Cortex reads and writes that store — it does not duplicate credentials. OpenCode may also use ~/.config/opencode/opencode.json for agent permissions; that is separate from Cortex VS Code settings.

Context sources

Cortex automatically gathers context from: