Skip to main content
Devin for Terminal loads configuration from multiple sources and merges them together. Understanding the precedence order helps you set up the right configuration for your team and personal preferences.

Configuration Layers

From highest to lowest priority:
PrioritySourceNotes
1 (highest)Organization / Team SettingsCannot be overridden
2Session (interactive approvals)In-memory only
3Project Local (.cognition/config.local.json)Personal, gitignored
4Project (.cognition/config.json)Shared with team
5 (lowest)User (~/.config/cognition/config.json)Your defaults
When the same setting is defined at multiple levels, the higher-priority source wins.

When to Use Each Level

User config

Path: ~/.config/cognition/config.jsonUse for personal preferences that apply everywhere:
  • Default model preference
  • Theme preference
  • Personal MCP servers (e.g., your own API keys)
  • Global permission grants
{
  "agent": { "model": "opus" },
  "permissions": {
    "allow": ["Read(**)", "Exec(git)"]
  }
}
Path: .cognition/config.jsonUse for team standards committed to the repository:
  • Shared MCP servers (with non-secret config)
  • Team permission policies
  • Import settings
{
  "permissions": {
    "allow": ["Exec(npm run)", "Read(src/**)"],
    "deny": ["Exec(sudo)"]
  },
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"]
    }
  }
}
Path: .cognition/config.local.jsonUse for personal overrides that shouldn’t be committed:
  • API keys and secrets
  • Personal tool preferences for this project
  • Permission overrides
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "ghp_my_personal_token"
      }
    }
  }
}
Local config files are automatically excluded from git via .git/info/exclude.
Managed by your enterprise admin through the team settings dashboard. These settings cannot be overridden by individual users and enforce organization-wide policies like model restrictions and MCP server allowlists.

How Merging Works

Permissions

Permission lists are merged (combined) across levels. A denial at a higher level cannot be overridden by an allow at a lower level. For example, if your organization denies Exec(sudo), adding Exec(sudo) to your user allow list has no effect — the organization denial always wins. However, other permissions like Read(**) at the project level are applied normally.

MCP Servers

MCP server configs are merged by name. A server defined at a higher level overrides the same-named server at a lower level. For example, if both your user config and project config define a “github” server, the project config version wins because it has higher priority than user config.

Scalar Values

Simple values (model, theme, booleans) use the highest priority source that defines them.

Project Root Detection

Devin for Terminal finds your project root by looking for a .git directory, walking up from your current working directory. Project config (.cognition/) is loaded from the project root.
If you have nested .cognition/ directories (e.g., in a monorepo), subdirectory configs take precedence over ancestor configs.

File Discovery Summary

FileFound byShared?
~/.config/cognition/config.jsonXDG pathNo
~/.config/cognition/config.local.jsonXDG pathNo
.cognition/config.jsonWalking up from cwdYes (committed)
.cognition/config.local.jsonWalking up from cwdNo (gitignored)
.cognition/skills/*/SKILL.mdProject rootYes (committed)
~/.config/cognition/skills/*/SKILL.mdXDG pathNo
AGENTS.mdProject rootYes (committed)