Skip to main content
Cortex reads a global config file, an optional project config file, and any overrides you pass on the command line — in that order, later sources winning. Environment variables sit between the files and the flags.

Where the files live

Commit the project file when the settings belong to the repository rather than to you.

Precedence

From strongest to weakest:
  1. -c / --config overrides and other command-line flags
  2. Environment variables
  3. Project config file
  4. Global config file
  5. Built-in defaults

Inspect and edit

/config and /reload-config do the reading from inside the TUI.
Cortex CLI /config tree view of the effective configuration

/config: a read-only view of the effective configuration — model, effort, permissions, sandbox, TUI settings, and the configured MCP servers. Edit with your editor.

Keys

Model

Permissions and sandboxing

The permission table sets per-capability policy — see Modes and permissions.

Behaviour

TUI

The same options are interactive under /settings (or F2) — Appearance, Mouse, Behavior, AI, Git, Cloud, Privacy — with a search box at the top.
Cortex CLI settings modal open on the Appearance section

/settings → Appearance: compact mode, screen mode, timestamps, thinking blocks, grouped tool calls, line numbers, word wrap, syntax highlight, animations, theme.

History and execution

Each execution key has a flag: --max-agent-threads, --max-tool-threads, --command-timeout, --http-timeout, --no-streaming.

Extensions

Profiles

A profile is a named bundle you select with -p / --profile:

Environment variables

Values are never documented here — keep secrets in your keyring or CI secret store.

Locations

Account

Interactive use should prefer cortex login. See Sign in.

Host for Code

The TUI and cortex exec create a Cloud Code session unless you select another host. This PC and SSH require an already connected Code session. Cortex will not create one on the fly and will not substitute the Cloud silently. See Code on desktop.

Model, logging, diagnostics

Set for you, not by you

Hook scripts and plugins can read CORTEX_FILE, CORTEX_SESSION_ID, CORTEX_MESSAGE_ID, and CORTEX_PLUGIN_ARGS. Cortex populates them for the processes it spawns.

Standard variables Cortex respects

EDITOR / VISUAL for cortex agent edit and similar; SHELL for completions; HTTPS_PROXY / HTTP_PROXY for cortex scrape; PATH, TERM, LANG, LC_ALL, USER in cortex debug system.

Data locations

Inside a project: AGENTS.md (from cortex init), .cortex/config.toml, .cortex/agents/, .cortex/skills/, .cortex/plugins/, .cortex/commands/. .agents/ and .agent/ are also scanned. Project files take priority over personal ones with the same name. Some subsystems use the platform application directory — ~/.local/share/Cortex/ on Linux, ~/Library/Application Support/Cortex/ on macOS, %APPDATA%\Cortex\ on Windows — and the platform cache directory. A legacy ~/.config/cortex is still read so older installs keep working. Credentials live in the OS keyring, not in any of these directories. See Sign in.

Shell completions