docs: sync to Claude Code v2.1.217

Bumps tutorial coverage from the v2.1.212 baseline (2026-07-18 sync) to
v2.1.217 (v2.1.213 was skipped upstream), plus a repo-internal accuracy
audit.

Fixed:
- Nested-subagent-spawning claim reversed (v2.1.217): 04-subagents/README.md
  and CATALOG.md stated nesting up to 5 levels as current behavior; as of
  v2.1.217 it's off by default, opt in via CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH
- Stale --enable-auto-mode flag (removed in v2.1.111) replaced with
  --permission-mode auto across 10-cli/README.md and QUICK_REFERENCE.md
- Import-depth contradiction in 02-memory/README.md: two remaining "5 levels"
  instances corrected to "4 hops", matching the rest of the file
- Sonnet 5 added to claude_concepts_guide.md's models/reasoning-effort table
- config-examples.json's fabricated settings schema (fake "unrestricted"/
  "confirm" modes, undocumented keys) rewritten to real settings.json keys
- brand-voice skill (name/user-invocable) aligned to its README worked example
- CLAUDE.md length guidance unified across 03-skills/claude-md/SKILL.md and
  02-memory/README.md

Added:
- New subagent caps (v2.1.217): CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS
- --max-budget-usd now also halts running background subagents (v2.1.217)
- Hook if: glob scope narrowed to <cwd>/dir (v2.1.214), documented in
  06-hooks/README.md along with SessionStart's new "fork" source
- sandbox.filesystem.disabled setting (v2.1.216)
- /rewind symlink/hard-link protection (v2.1.216)
- Auto-memory modified timestamp (v2.1.214) and non-blocking /memory editor
  (v2.1.216)
- CLI/settings batch (v2.1.214-217): emojiCompletionEnabled,
  FORCE_HYPERLINK=0, CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH, --settings 2 MiB
  cap, permission hardening notes, /context and /compact notes
- /verify and /code-review explicit-invocation-only note (v2.1.215)

Mirrored applicable P0/P1 fixes into vi/ja/zh/uk translations where the
same claim existed.
This commit is contained in:
Luong NGUYEN
2026-07-22 21:47:38 +07:00
parent e9489e645d
commit c10d54c0d7
30 changed files with 320 additions and 287 deletions
+17 -9
View File
@@ -83,7 +83,7 @@ The older JavaScript bundle is still produced for Windows and for environments t
| `--teammate-mode` | Agent team display mode | `claude --teammate-mode tmux` |
| `--bare` | Minimal mode (skip hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` |
| `--safe-mode` | Start with all customizations disabled (CLAUDE.md, plugins, skills, hooks, MCP) to isolate config problems; also `CLAUDE_CODE_SAFE_MODE=1` (v2.1.169) | `claude --safe-mode` |
| `--enable-auto-mode` | Unlock auto permission mode (no longer required for Max subscribers on Opus 4.7) | `claude --enable-auto-mode` |
| `--permission-mode auto` | Start in auto permission mode (replaces the removed `--enable-auto-mode` flag, gone since v2.1.111) | `claude --permission-mode auto` |
| `--channels` | Subscribe to MCP channel plugins | `claude --channels discord,telegram` |
| `--chrome` / `--no-chrome` | Enable/disable Chrome browser integration | `claude --chrome` |
| `--effort` | Set thinking effort level | `claude --effort high` |
@@ -199,7 +199,8 @@ claude -p --system-prompt-file ./prompts/code-reviewer.txt "review main.py"
| `--dangerously-skip-permissions` | Skip all permission prompts | `claude --dangerously-skip-permissions` |
| `--permission-mode` | Begin in specified permission mode | `claude --permission-mode auto` |
| `--permission-prompt-tool` | MCP tool for permission handling | `claude -p --permission-prompt-tool mcp_auth "query"` |
| `--enable-auto-mode` | Unlock auto permission mode | `claude --enable-auto-mode` |
> **v2.1.111 update**: `--enable-auto-mode` was removed; auto mode is now in the `Shift+Tab` cycle by default — use `--permission-mode auto` to start in it directly.
> **Glob / Grep footnote (v2.1.113+)**: On native macOS/Linux builds, `Glob` and `Grep` are provided as the embedded `bfs` and `ugrep` binaries invoked through the Bash tool rather than as separate first-class tools. Windows and npm-bundled (JS) installs still expose them as standalone tools. For subagent `allowedTools` / `disallowedTools` lists the backend substitution is transparent — you can keep referring to `Glob` / `Grep` in your configuration on every platform.
@@ -207,6 +208,8 @@ claude -p --system-prompt-file ./prompts/code-reviewer.txt "review main.py"
> **`--permission-mode` honored on resume (v2.1.132+)**: `claude -p --continue --permission-mode plan` (and `--resume`) now respects the flag. Earlier versions silently dropped `--permission-mode` when resuming a session, so a plan-mode session resumed without re-passing the flag would silently downgrade — that's fixed.
> **Permission hardening (v2.1.214)**: Docker/Podman commands using daemon-redirect flags (e.g. `--url`, `--connection`, `--identity`) now require a permission prompt instead of running automatically. `file` commands using `-m`/`--magic-file` or `-f`/`--files-from` also now require permission. Bash commands over 10,000 characters always prompt for permission, regardless of allow rules.
### Permission Examples
```bash
@@ -234,7 +237,7 @@ claude --disallowedTools "Bash(rm -rf:*)" "Bash(git push --force:*)"
| `--verbose` | Enable verbose logging | | `claude --verbose` |
| `--include-partial-messages` | Include streaming events | Requires `stream-json` | `claude -p --output-format stream-json --include-partial-messages "query"` |
| `--json-schema` | Get validated JSON matching schema | | `claude -p --json-schema '{"type":"object"}' "query"` |
| `--max-budget-usd` | Maximum spend for print mode | | `claude -p --max-budget-usd 5.00 "query"` |
| `--max-budget-usd` | Maximum spend for print mode. Since v2.1.217, hitting the cap also halts running background subagents and denies new spawns (previously background agents kept running past the cap) | | `claude -p --max-budget-usd 5.00 "query"` |
### Output Format Examples
@@ -261,7 +264,7 @@ claude -p --json-schema '{"type":"object","properties":{"bugs":{"type":"array"}}
| `--setting-sources` | Comma-separated setting sources | `claude --setting-sources user,project` |
> **`/config` persistence (v2.1.119)**: Changes made interactively via the `/config` command are now written to `~/.claude/settings.json` and participate in the normal precedence chain (policy → local → project → user). Before v2.1.119, some `/config` changes were session-only. See [Memory & Settings](../02-memory/README.md) for the full precedence order.
| `--settings` | Load settings from file or JSON | `claude --settings ./settings.json` |
| `--settings` | Load settings from file or JSON. File must be no larger than 2 MiB (v2.1.214) | `claude --settings ./settings.json` |
| `--plugin-dir` | Load plugins from directory (repeatable) | `claude --plugin-dir ./my-plugin` |
### Multi-Directory Example
@@ -362,13 +365,12 @@ claude project purge --all --interactive
| `--enable-lsp-logging` | Enable verbose LSP logging | `claude --enable-lsp-logging` |
| `--betas` | Beta headers for API requests | `claude --betas interleaved-thinking` |
| `--plugin-dir` | Load plugins from directory (repeatable) | `claude --plugin-dir ./my-plugin` |
| `--enable-auto-mode` | Unlock auto permission mode | `claude --enable-auto-mode` |
| `--effort` | Set thinking effort level | `claude --effort high` |
| `--bare` | Minimal mode (skip hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` |
| `--channels` | Subscribe to MCP channel plugins | `claude --channels discord` |
| `--tmux` | Create tmux session for worktree | `claude --tmux` |
| `--fork-session` | Create new session ID when resuming | `claude --resume abc --fork-session` |
| `--max-budget-usd` | Maximum spend (print mode) | `claude -p --max-budget-usd 5.00 "query"` |
| `--max-budget-usd` | Maximum spend (print mode); also halts background subagents when hit (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` |
| `--json-schema` | Validated JSON output | `claude -p --json-schema '{"type":"object"}' "q"` |
| `--ax-screen-reader` | Plain-text rendering mode for screen readers (v2.1.208) | `claude --ax-screen-reader` |
@@ -842,6 +844,8 @@ The "ultrathink" keyword in prompts activates deep reasoning. The `/effort` menu
| `CLAUDE_CODE_SESSION_ID` | Set in every Bash tool subprocess launched by Claude Code; equals the `session_id` in hook input JSON. Use to correlate bash logs with hook telemetry (v2.1.132+). |
| `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` | Set to `1` to re-enable Anthropic's session-quality survey for organizations capturing OpenTelemetry data. Off by default in OTEL deployments (v2.1.136+). |
| `OTEL_LOG_TOOL_DETAILS` | Set to `1` to unredact custom and MCP command names in OpenTelemetry events (v2.1.117+). Redaction remains the default. |
| `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` | Configures the truncation limit (default 60 KB) applied to OpenTelemetry content attributes (v2.1.214) |
| `FORCE_HYPERLINK` | Set to `0` to opt out of clickable PR-badge hyperlinks in the footer, which now render even when terminal support can't be auto-detected (v2.1.217) |
| `ANTHROPIC_BEDROCK_SERVICE_TIER` | Selects the Bedrock service tier: `default`, `flex`, or `priority` (v2.1.122+) |
| `AI_AGENT` | Set automatically on subprocesses so external CLIs (e.g., `gh`) can attribute traffic to Claude Code (v2.1.120+) |
| `CLAUDE_CODE_FORCE_SYNC_OUTPUT` | Set to `1` to force synchronous output for terminals where auto-detection misses (e.g., Emacs `eat`) (v2.1.129+) |
@@ -850,6 +854,8 @@ The "ultrathink" keyword in prompts activates deep reasoning. The `/effort` menu
| `CLAUDE_CODE_ENABLE_AUTO_MODE` | Legacy opt-in for auto mode on Bedrock, Vertex, and Foundry (v2.1.158v2.1.206). As of v2.1.207, auto mode is available by default on those providers for Sonnet 5, Opus 4.7/4.8, and Fable 5 — this variable is accepted for compatibility but has no effect |
| `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION` | Cap on WebSearch tool calls per session, to stop runaway search loops. Default 200 (v2.1.212) |
| `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION` | Cap on subagent spawns per session, to stop runaway delegation loops. Default 200; `/clear` resets the budget (v2.1.212) |
| `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` | Cap on subagents running concurrently. Default 20 (v2.1.217) |
| `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` | Controls how deep nested subagent spawns can go. Nesting is now off by default; set this to opt back in to deeper nesting (v2.1.217) |
| `CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS` | Threshold, in milliseconds, before a long-running MCP tool call auto-backgrounds. Default 120000 (2 minutes) (v2.1.212) |
| `CLAUDE_AX_SCREEN_READER` | Set to `1` to enable plain-text screen reader rendering mode. Same effect as `--ax-screen-reader` or `"axScreenReader": true` in settings (v2.1.208) |
| `CLAUDE_CLIENT_PRESENCE_FILE` | Point at a marker file to suppress mobile push notifications while you're at the machine (v2.1.181+). Note: the name is `CLAUDE_CLIENT_PRESENCE_FILE`, not `CLAUDE_CODE_CLIENT_PRESENCE_FILE`. |
@@ -873,6 +879,8 @@ These keys live in a `settings.json` file (`~/.claude/settings.json` for user sc
| `wheelScrollAccelerationEnabled` | (v2.1.174) Set to `false` to disable mouse-wheel scroll acceleration in the fullscreen renderer. Useful when fast wheel flicks overshoot. |
| `footerLinksRegexes` | (v2.1.176) Array of regexes that render matched links as badges in the footer row. Configurable in user or managed settings. |
| `language` | Sets Claude's preferred response language and voice-dictation language (e.g. `"french"`, `"japanese"`). As of **v2.1.176** it also pins the language used for auto-generated session titles. |
| `sandbox.filesystem.disabled` | (v2.1.216) Skips filesystem sandboxing while keeping network egress control enforced. For workflows where file sandboxing breaks tooling but network policy must stay enforced. |
| `emojiCompletionEnabled` | (v2.1.217) Enables emoji shortcode autocomplete in the prompt input (e.g. typing `:heart:` inserts ❤️). Set `false` to disable. |
```json
{
@@ -912,7 +920,7 @@ claude -p --output-format json "query"
| Quick code review | `cat file \| claude -p "review"` |
| Structured output | `claude -p --output-format json "query"` |
| Safe exploration | `claude --permission-mode plan` |
| Autonomous with safety | `claude --enable-auto-mode --permission-mode auto` |
| Autonomous with safety | `claude --permission-mode auto` |
| CI/CD integration | `claude -p --max-turns 3 --output-format json` |
| Resume work | `claude -r "session-name"` |
| Custom model | `claude --model opus "complex task"` |
@@ -986,8 +994,8 @@ claude -p --output-format json "query"
---
**Last Updated**: July 18, 2026
**Claude Code Version**: 2.1.212
**Last Updated**: July 22, 2026
**Claude Code Version**: 2.1.217
**Sources**:
- https://code.claude.com/docs/en/cli-reference
- https://code.claude.com/docs/en/env-vars