Skip to content

Configuration & profiles

Every CLI in scope has a hierarchy of configuration locations: a project-level file checked into the repo, a user-level file in your home directory, and optional managed-policy overrides for orgs. These files hold the settings that don’t belong in a prompt or a skill — the default model, permission rules, MCP server registrations, hooks, theme, output format defaults.

Codex is the only tool in scope with named profiles — separate config bundles in the same file that you swap with --profile <name> at launch. Claude Code and opencode achieve a similar feel through different mechanisms (local-settings files; per-agent customisation). Cursor and Copilot ride VS Code’s settings.json model — Cursor adds a .cursor/ directory at the repo root for its native assets; Copilot’s settings live under the github.copilot.* and chat.* namespaces, plus repo-level files under .github/ and org-level policy on github.com.

You wanted to change the default model to the cheaper one. Twenty minutes later you’ve got three browser tabs open, one for each tool’s docs, and you’ve discovered: there’s a project setting, a user setting, an environment variable, a TOML profile, a managed config, and a flag, and they all interact, and the one you edited isn’t the one that’s winning, and you can’t actually tell which one is winning because nothing in the TUI says.

Or: you’ve got a “safe” setup you use for client repos (ask before every shell command, deny edits to anything outside the workspace) and a “wide open” setup you use for personal projects (allow everything, never ask). You currently swap between them by hand-editing the settings file every time, which is exactly the kind of fiddly chore you started using the CLI to avoid.

That’s the gap configuration design closes. Once you know where each setting lives, which layer wins, and what mechanism your tool uses for swapping setups (Codex profiles, Claude Code local-settings, opencode primary agents), the chore becomes a flag. “Use the safe setup” becomes codex --profile safe — once.

Real-world examples of what teams put in configuration (vs. in code or skills):

  • Default model — pin Sonnet for the project so contributors don’t all use whatever they happen to default to. See Model selection.
  • Permission policy — the team’s allow/ask/deny rules, checked in so everyone gets the same guardrails. See Permissions.
  • MCP server registrations — your repo’s Postgres/Linear/Figma adapters wired up once, in .mcp.json / config.toml / opencode.json. See MCP servers.
  • Hook bindings — declarative event handlers (lint after edit, block pushes to main). See Hooks.
  • Personal overrides — Claude Code’s settings.local.json (gitignored) for your machine-specific quirks: a different model, a noisier hook, an extra debugging MCP server.
  • Org policy — managed config that mandates: deny Bash(rm:*), require approval for Bash(*), force a specific model. Cannot be overridden by user settings.
  • Profile bundles (Codex)--profile work (sandboxed, conservative), --profile yolo (full access, never asks), --profile review (read-only, untrusted). Swap by flag.

The test: if the same setting is being typed at the CLI more than once, or copy-pasted between files, it belongs in configuration.

You want to…Reach forNot
Pin defaults that survive across sessions (model, theme, output format)Configuration fileEnv vars per session
Share team settings via the repoProject config (checked in)User config
Keep personal overrides off gitClaude Code settings.local.json / shell envProject config
Swap between named setups with one flagCodex profileEditing the file each time
Distribute config + skills + hooks + MCP as one unitPluginRaw config
Enforce org-wide policy that can’t be overriddenManaged configProject / user files
Give one agent a different posture than another (opencode)Custom primary agentA second profile

Configuration is for defaults and policy. Skills, hooks, MCP servers, and subagents are still where the behaviour lives — config just enables them and sets their defaults. If you find your config file growing into a procedure, you wanted a skill.

Locations:

  • .claude/settings.json — project (checked in)
  • .claude/settings.local.json — project (gitignored, your local overrides)
  • ~/.claude/settings.json — user
  • Managed-policy settings.json — org-controlled

Layering: managed > user > project local > project shared. Each level can set permissions, hooks, MCP servers, skill overrides, and other knobs.

Settings categories:

  • permissions — see Permissions
  • hooks — see Hooks
  • skillOverrides — hide or expose specific skills without editing them
  • model — default model for this scope
  • Misc TUI knobs (theme, status line)

Claude Code does not have named profiles. Each scope’s settings.json is the only config for that scope at a time. To swap configs, you change the file (or move it).

AspectClaude CodeCodexopencodeCursorCopilot
Project config.claude/settings.json.codex/config.toml (in trusted dirs)opencode.json.vscode/settings.json + .cursor/ (rules, mcp, hooks, etc.).github/copilot-instructions.md, .github/instructions/, .vscode/mcp.json
Local-only project config.claude/settings.local.json (gitignored)
User config~/.claude/settings.json~/.codex/config.toml~/.config/opencode/opencode.jsonCursor/User/settings.json (platform path) + ~/.cursor/VS Code user settings.json + ~/.copilot/ (CLI)
FormatJSONTOMLJSONJSON (VS Code) + assorted files under .cursor/JSON (VS Code settings.json)
Managed/org overridesYesYes (managed configs)Yes (managed configs)Yes (Team / Enterprise dashboard)Yes (github.com org policy, Business/Enterprise)
Named profilesNoYes (--profile)No (use primary agents)NoNo
  • In Claude Code, use settings.local.json for anything you don’t want checked in — model overrides, personal hook scripts, allow rules unique to your machine.
  • In Codex, profiles are the cleanest way to switch between a “safe” work setup and a YOLO experimentation setup without retyping flags.
  • In opencode, don’t try to emulate Codex profiles by swapping opencode.json — define custom primary agents instead.
  • In Cursor and Copilot, the IDE’s settings.json is the source of truth — check .vscode/settings.json into the repo for shared defaults, then let user settings.json override.
  • “Profile” in Codex means a named config bundle. The word doesn’t mean the same thing in Claude Code or opencode — both use “settings level” or “scope.”