Overview
Claude Code uses a scope hierarchy where some features exist at both the global (~/.claude/) and project (.claude/) levels, while others are exclusively global.
~/.claude/is your user-level home (global, all projects).claude/inside a repo is your project-level home (scoped to that project)
Global-Only Features
These live only under~/.claude/ and cannot be scoped to a project:
| Feature | Location | Purpose |
|---------|----------|---------||
| Tasks | ~/.claude/tasks/ | Persistent task lists across sessions and agents |
| Agent Teams | ~/.claude/teams/ | Multi-agent coordination configs (experimental, Feb 2026) |
| Auto Memory | ~/.claude/projects/<hash>/memory/ | Claude’s self-written learnings per project (personal, never shared) |
| Credentials & OAuth | System keychain + ~/.claude.json | API keys, OAuth tokens (never in project files) |
| Keybindings | ~/.claude/keybindings.json | Custom keyboard shortcuts |
| MCP User Servers | ~/.claude.json (mcpServers key) | Personal MCP servers across all projects |
| Preferences/Cache | ~/.claude.json | Theme, model, output style, session state |
Dual-Scope Features
These exist at both levels, with project-level taking precedence over global:| Feature | Global (~/.claude/) | Project (.claude/) | Precedence |
|---|---|---|---|
| CLAUDE.md | ~/.claude/CLAUDE.md | ./CLAUDE.md or .claude/CLAUDE.md | Project overrides global |
| Settings | ~/.claude/settings.json | .claude/settings.json + .claude/settings.local.json | Project > Global |
| Rules | ~/.claude/rules/*.md | .claude/rules/*.md | Project overrides |
| Agents/Subagents | ~/.claude/agents/*.md | .claude/agents/*.md | Project overrides |
| Commands | ~/.claude/commands/*.md | .claude/commands/*.md | Both available |
| Skills | ~/.claude/skills/ | .claude/skills/ | Both available |
| Hooks | ~/.claude/hooks/ | .claude/hooks/ | Both execute |
| MCP Servers | ~/.claude.json (user scope) | .mcp.json (project scope) | Three scopes: local > project > user |
Settings Precedence
User-writable settings apply in this override order (highest to lowest): | Priority | Location | Scope | Version Control | Purpose | |----------|----------|-------|-----------------|---------|| | 1 | Command line flags | Session | N/A | Single-session overrides | | 2 |.claude/settings.local.json | Project | No (git-ignored) | Personal project-specific |
| 3 | .claude/settings.json | Project | Yes (committed) | Team-shared settings |
| 4 | ~/.claude/settings.local.json | User | N/A | Personal global overrides |
| 5 | ~/.claude/settings.json | User | N/A | Global personal settings |
Directory Structure Comparison
- Global Scope
- Project Scope
Tasks System
Introduced in Claude Code v2.1.16 (January 22, 2026), replacing the deprecated TodoWrite system.
Storage
Tasks are stored at~/.claude/tasks/ on the local filesystem (not in a cloud database). This makes task state auditable, version-controllable, and crash-recoverable.
Tools
| Tool | Purpose | |------|---------|| | TaskCreate | Create a new task withsubject, description, and activeForm |
| TaskGet | Retrieve full details of a specific task by ID |
| TaskUpdate | Change status, set owner, add dependencies, or delete |
| TaskList | List all tasks with their current status |
Task Lifecycle
Dependency Management
Tasks can block other tasks viaaddBlockedBy/addBlocks, creating dependency graphs that prevent premature execution.
Multi-Session Collaboration
Key Differences from Old Todos
| Feature | Old Todos | New Tasks | |---------|-----------|-----------|| | Scope | Single session | Cross-session, cross-agent | | Dependencies | None | Full dependency graph | | Storage | In-memory only | File system (~/.claude/tasks/) |
| Persistence | Lost on session end | Survives restarts and crashes |
| Multi-session | Not possible | Via CLAUDE_CODE_TASK_LIST_ID |
Agent Teams
Agent Teams allow multiple Claude Code sessions to coordinate on shared work.Enabling
Configuration
Team configs live at~/.claude/teams/{team-name}/ and support modes:
| Mode | Description | Requirements |
|------|-------------|--------------||
| In-process (default) | All teammates run inside your terminal | None |
| Split panes | Each teammate gets its own pane | tmux or iTerm2 (not VS Code terminal) |
Design Principles
The global-only vs dual-scope split follows a clear pattern: | Category | Scope | Rationale | |----------|-------|-----------|| | Coordination state (tasks, teams) | Global-only | Needs to persist beyond any single project | | Security state (credentials, OAuth) | Global-only | Prevents accidental commits to version control | | Personal learning (auto-memory) | Global-only | User-specific, not team-shareable | | Input preferences (keybindings) | Global-only | User muscle memory, not project-specific | | Configuration (settings, rules, agents) | Both levels | Teams need to share project-specific behavior | | Workflow definitions (commands, skills) | Both levels | Can be personal or team-shared |Auto-memory (
~/.claude/projects/<hash>/memory/) is a notable hybrid: it’s about a specific project but stored globally because it represents personal learning rather than team-shareable configuration.Sources
- Claude Code Settings Documentation
- Orchestrate Teams of Claude Code Sessions
- What are Tasks in Claude Code - ClaudeLog
- Claude Code Task Management - ClaudeFast
- Claude Code Tasks Update - VentureBeat
- Where Are Claude Code Global Settings - ClaudeLog
- Claude Opus 4.6 Agent Teams - VentureBeat
- How to Set Up Claude Code Agent Teams - r/ClaudeCode
- Anthropic replaced Claude Code’s old ‘Todos’ with Tasks - r/ClaudeAI
