Configuration

oi reads two JSON files, the later one winning key by key:

  1. ~/.config/oi/config.json (or $XDG_CONFIG_HOME/oi/config.json): your defaults.
  2. .oi/config.json in the working directory: per-project overrides, shared with the repository.
  3. This project's entry in ~/.config/oi/projects.json (keyed by the project's absolute path): your own per-project settings, kept outside the repository. "Always allow" answers are saved here.

Then OI_MODEL and command-line flags override them, for that run only. No file has to exist. Lists (write_roots, permission rules, hooks) accumulate across files. A repository's .oi/config.json is not trusted to run commands: its hooks need approval, and its own rules and permission_mode cannot approve them.

{
  "model": "deepseek/deepseek-v4-pro",
  "effort": "max",
  "permission_mode": "auto",
  "sandbox": "auto",
  "network": true,
  "write_roots": ["/tmp/scratch"]
}
Key Values Default
model provider/model; see Providers anthropic/claude-opus-5-5
effort none, minimal, low, medium, high, xhigh, max, clamped to what the model accepts high
permission_mode ask, auto (approve everything) or read-only ask
providers custom providers and key refs; see Providers
prompt_cache 5m, 1h or off 5m
sandbox auto, require or off auto
network outbound network: shell and stdio MCP children, HTTP MCP servers, web_fetch and web_search true
write_roots extra writable directories (appended across files)
max_tokens output token cap per request 64000
max_steps steps per turn 200
compact_threshold input tokens that trigger compaction 400000
bash_timeout_ms shell command timeout 120000
auto_update install new releases in the background true
codemode_mem_mb, codemode_timeout_ms code-mode memory and time limits 64, 60000
subagents true, false, or "explicit" (the model is told to delegate only when you ask) true
subagent_max_parallel sub-agents running at once, kernel-wide; more wait in a queue 6
subagent_max_depth how deep agents nest (1: sub-agents cannot start their own) 1
budget_usd stop a turn, sub-agents included, once its estimated cost passes this none
permissions {"allow": [...], "ask": [...], "deny": [...]} rules; see Permission rules
hooks shell commands run at points of the loop; see Hooks
web_search {"provider": "brave" | "tavily" | "exa" | "searxng" | "duckduckgo", "url", "api_key": {"env" | "keychain": ...}} auto

Saved choices. Picking a model (/model), an effort (/effort) or a permission mode (/mode, Shift+Tab) in the full-screen UI writes it back, so the next run starts the same way. It goes to the project's .oi/config.json when that file already sets the key, otherwise to the user file. Other keys are kept, and the file is rewritten pretty-printed with sorted keys. /model and /effort also save from the line-by-line mode. Flags, OI_MODEL and resuming a session that used another model never write config.