Claude Code has a set of power features that experienced users reach for on complex or risky work. Planning mode, extended thinking, auto mode, sandboxing, and headless operation all change how Claude works in fundamental ways. This module covers each one in depth.
Planning Mode and Extended Thinking
Planning mode separates thinking from doing. When you activate it, Claude first researches the codebase and creates a detailed implementation plan. You review and optionally modify the plan, then Claude executes it. This prevents the common failure mode of Claude starting to code before fully understanding the problem.
Activate it with /plan <description>, the --permission-mode plan CLI flag, or Shift+Tab to cycle permission modes. Use Ctrl+G to open the current plan in your external editor for detailed modifications before approving. The opusplan model alias routes planning to Opus and execution to Sonnet:
claude --model opusplan "redesign the database schema for multi-tenancy"
Extended thinking gives Claude more time to reason before responding. Toggle it with Option+T (macOS) or Alt+T. The /effort command sets reasoning depth: low, medium, high, or max (Opus only). Set it per-session with export CLAUDE_CODE_EFFORT_LEVEL=high. For prompts where you need maximum reasoning, include the word “ultrathink” — it activates deep reasoning mode regardless of the effort setting.
The combination of plan mode plus high effort is powerful for complex architectural decisions:
claude --permission-mode plan --effort high --model opusplan "migrate from REST to GraphQL"
Auto Mode and Permission Control
Auto Mode is a research-preview permission mode that uses a background safety classifier to decide whether tool calls are safe to run without prompting. It’s designed for higher-autonomy workflows where you still want guardrails around risky actions.
You use it the same way as the other permission modes: select auto in your permission settings or cycle to it with Shift+Tab when that mode is available in your setup. Organizations can tune what Auto Mode treats as trusted infrastructure with the autoMode settings block.
Out of the box, Auto Mode is conservative around actions that look like data exfiltration, risky shell execution, or production-impacting changes. If your team has trusted repos, internal domains, buckets, or services that Auto Mode should treat as normal, define them in autoMode.environment.
Permission modes span a spectrum. default reads freely but prompts for actions beyond that. acceptEdits auto-approves file edits but prompts for commands. plan switches into planning-first research mode. auto uses the classifier. dontAsk only runs pre-approved tools and denies everything else. bypassPermissions skips all safety checks entirely. Set a default in settings:
{
"permissions": {
"defaultMode": "acceptEdits"
}
}
To customize Auto Mode for your environment:
{
"autoMode": {
"environment": [
"Source control: github.example.com/acme-corp and all repos under it",
"Trusted internal domains: *.corp.example.com, api.internal.example.com"
]
}
}
Programmatic and Sandboxed Operation
Running Claude Code programmatically with claude -p "your prompt" executes it non-interactively. Output goes to stdout, making it composable with shell pipelines and automation systems. Combine it with --output-format json for structured output. Use --permission-mode bypassPermissions for fully automated CI/CD use:
# Automated code review in CI
git diff HEAD~1 | claude -p "review these changes for security issues" \
--output-format json \
--permission-mode bypassPermissions
# Generate docs for changed files
claude -p "generate JSDoc for all functions in $CHANGED_FILE" \
--print --no-session-persistence
Sandboxing provides OS-level isolation for file system and network access. Enable it with /sandbox in-session or the --sandbox CLI flag. In sandbox mode, Claude can only access approved paths and network rules you configure. This is valuable for running Claude on untrusted code or in environments where you want strict boundaries.
For enterprise deployments, managed settings override user settings through platform-native management: plist on macOS, Registry on Windows, managed configuration files, and managed-settings.d/ drop-ins merged alphabetically. That’s separate from managed memory files such as organization-level CLAUDE.md guidance.
# Test headless with sandboxing
claude -p "analyze the security of this codebase" \
--sandbox \
--permission-mode plan \
--output-format json
More Advanced Features
Claude Code’s advanced toolkit goes beyond planning and sandboxing. Background tasks let long-running work continue while you keep chatting. Scheduled tasks support /loop for session-scoped recurring checks and /schedule for cloud-backed scheduled work. Session tools like /resume, /rename, and web handoff features make it easy to move between local CLI, the browser, and the desktop app.
There are also platform features that become important in daily use: voice dictation with /voice, Chrome integration with /chrome, remote control via /remote-control, browser-based web sessions, desktop-only previews and diff review, prompt suggestions, persistent task lists, and git worktree workflows with claude --worktree. These all share the same permission system, so advanced usage is mostly about combining the right mode with the right surface.