LatentCode

Configuration

LatentCode reads JSON config from your home directory and from each project. Most people never edit it by hand — the config CLI covers the essentials — but here's what's available.

Where config lives

ScopeLocation
Global~/.config/latentcode/latentcode.jsonc
Projectlatentcode.json (or .jsonc) in your project, and files up the tree
Project dir.latentcode/ directories, walked up from your working directory

Project config layers on top of global config. A minimal file looks like this:

jsonc
{
  "$schema": "https://latentstack.dev/config.json",
  "model": "anthropic/claude-sonnet-4-5",
  "default_agent": "build"
}
You usually don't need this
Connection settings (API key, gateway URL, default model) are managed by latentcode config set … — see the Getting started page. Edit the file directly only for advanced keys like custom commands, MCP servers, or keybindings.

Keys you'll actually set

KeyPurpose
modelDefault model for new sessions (provider/model)
small_modelFaster model for lightweight tasks (titles, goal checks)
default_agentWhich agent starts by default (build / plan)
keybindsOverride any TUI keybinding
commandDefine your own slash commands
skillsExtra skill folders to load
mcpMCP servers to connect
pluginPlugins to load
instructionsExtra instruction files the agent always reads
permissionRules for what needs approval
compactionTune automatic context compaction

Handy environment variables

All variables are prefixed LATENTCODE_. The ones worth knowing:

VariableEffect
LATENTCODE_CONFIGPath to a specific config file to use
LATENTCODE_CONFIG_DIROverride the config directory
LATENTCODE_DISABLE_PROJECT_CONFIGIgnore project-level config
LATENTCODE_PURERun without any external plugins
LATENTCODE_DISABLE_AUTOUPDATETurn off automatic update checks