mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-09-26 13:20:42 +02:00
docs: sync to Claude Code v2.1.283 (#184)
* docs: sync to Claude Code v2.1.283
Audit the tutorial against Claude Code 2.1.280-2.1.283 (baseline 2.1.278;
2.1.279 was never published) and fix claims that are now false.
- P0: /agents shown as a working command (5 languages); 10-cli and concepts
guide model tables naming Sonnet 5 / Opus 5 as defaults (Opus 5.5 since
v2.1.280); two quiz answer keys (L10 Q5, L01 Q9)
- P1: Opus 5.5 effort/fast/model defaults; send now backgrounds tools;
cmd is not an alias of meta; AGENTS.md provider caveat lifted in 2.1.281;
Ctrl+X Ctrl+K replaces Ctrl+F; MCP tool search on by default; quoted
${CLAUDE_PLUGIN_ROOT}; --system-prompt-file works interactively;
CLAUDE_CODE_AUTO_MODE_SERVER scope; quiz and self-assessment fixes
- P2/P3 (approved): auto-mode start on third-party/telemetry-off, agent hooks
on PermissionRequest, rm 2-minute auto-deny, Opus 5.5 always thinks,
new settings and plugin validate checks
lesson-quiz 1.3.0 -> 1.4.0, self-assessment 2.5.0 -> 2.5.1.
Footers refreshed to 2.1.283 on every touched file.
* fix(subagents): replace remaining /agents instructions in translated lessons
This commit is contained in:
1 parent
8aeb5a72dc
commit
c777d43e5a
55 files changed
+379
-297
No files matched your search
+23
-11
@@ -186,7 +186,7 @@ claude --model opusplan "design and implement the caching layer"
|
||||
| Flag | Description | Example |
|
||||
|------|-------------|---------|
|
||||
| `--system-prompt` | Replace entire default prompt | `claude --system-prompt "You are a Python expert"` |
|
||||
| `--system-prompt-file` | Load prompt from file (print mode) | `claude -p --system-prompt-file ./prompt.txt "query"` |
|
||||
| `--system-prompt-file` | Load prompt from file, replacing the default prompt | `claude -p --system-prompt-file ./prompt.txt "query"` |
|
||||
| `--append-system-prompt` | Append to default prompt | `claude --append-system-prompt "Always use TypeScript"` |
|
||||
| `--append-subagent-system-prompt` | Append text to every subagent's system prompt (non-interactive) | `claude -p --append-subagent-system-prompt "Cite sources" "query"` |
|
||||
| `--append-subagent-system-prompt-file` | (v2.1.261) Load that appended text from a file instead, for prompts too long to pass on the command line. Non-interactive only, and **cannot be combined** with `--append-subagent-system-prompt` | `claude -p --append-subagent-system-prompt-file ./subagent-rules.txt "query"` |
|
||||
@@ -209,10 +209,10 @@ claude -p --system-prompt-file ./prompts/code-reviewer.txt "review main.py"
|
||||
| Flag | Behavior | Interactive | Print |
|
||||
|------|----------|-------------|-------|
|
||||
| `--system-prompt` | Replaces entire default system prompt | ✅ | ✅ |
|
||||
| `--system-prompt-file` | Replaces with prompt from file | ❌ | ✅ |
|
||||
| `--system-prompt-file` | Replaces with prompt from file | ✅ | ✅ |
|
||||
| `--append-system-prompt` | Appends to default system prompt | ✅ | ✅ |
|
||||
|
||||
**Use `--system-prompt-file` only in print mode. For interactive mode, use `--system-prompt` or `--append-system-prompt`.**
|
||||
**All system prompt flags work in both interactive and print mode (the file forms since v2.1.69). `--system-prompt` and `--system-prompt-file` replace the default prompt; the append flags add to it.**
|
||||
|
||||
## Tool & Permission Management
|
||||
|
||||
@@ -789,8 +789,9 @@ Claude Code supports multiple models with different capabilities:
|
||||
|
||||
| Model | ID | Context Window | Notes |
|
||||
|-------|-----|----------------|-------|
|
||||
| Sonnet 5 | `claude-sonnet-5` | 1M tokens | Default on Pro / Team Standard / Enterprise seats (v2.1.197); native 1M-token context window. As of v2.1.219, **Opus 5** is the default Opus model on Max, Team Premium, Enterprise pay-as-you-go, and the Anthropic API; Microsoft Foundry still resolves the `opus` alias to Opus 4.6 |
|
||||
| Opus 5 | `claude-opus-5` | 1M tokens | Default Opus model on Max, Team Premium, Enterprise pay-as-you-go, Anthropic API, Claude Platform on AWS, Amazon Bedrock, and Google Cloud's Agent Platform (v2.1.219); adaptive effort levels `low → max`, default effort `high` |
|
||||
| Opus 5.5 | `claude-opus-5-5` | 1M tokens | Default model and default Opus model since v2.1.280 on Pro, Max, Team, Enterprise, the Anthropic API, Claude Platform on AWS, Amazon Bedrock, and Google Cloud's Agent Platform (Pro and Team Standard previously defaulted to Sonnet 5); Microsoft Foundry still resolves `opus` to Opus 4.6 and `default` to Sonnet 4.5. Adaptive effort levels `low → max`, default effort `medium`; thinking can't be turned off. Requires v2.1.280+ |
|
||||
| Sonnet 5 | `claude-sonnet-5` | 1M tokens | Default on Pro / Team Standard seats from v2.1.197 until v2.1.280, when those plans moved to Opus 5.5; native 1M-token context window |
|
||||
| Opus 5 | `claude-opus-5` | 1M tokens | Default Opus model from v2.1.219 until v2.1.280 (now Opus 5.5); still selectable; adaptive effort levels `low → max`, default effort `high` |
|
||||
| Opus 4.8 | `claude-opus-4-8` | 1M tokens | Previous flagship Opus, still selectable; adaptive effort levels `low → max`; default effort `high` (v2.1.154) |
|
||||
| Sonnet 4.6 | `claude-sonnet-4-6` | 1M tokens | Balanced speed and capability; default effort for Pro/Max subscribers raised from `medium` to `high` in v2.1.117 |
|
||||
| Haiku 4.5 | `claude-haiku-4-5` | 200K tokens | Fastest, best for quick tasks; no effort levels |
|
||||
@@ -814,11 +815,11 @@ claude --model opusplan "design and implement the API"
|
||||
|
||||
> **Fable 5.1 and the `fable` alias (v2.1.257)**: Fable 5.1 (`claude-fable-5-1`) ships in **v2.1.257**, and the `fable` alias now resolves to it rather than to Fable 5. The official model-config page says Fable 5.1 "requires Claude Code v2.1.255 or later", but 2.1.255 was never published — v2.1.257 is the first release users can actually install it with. On a Claude apps gateway, `fable` and `best` still resolve to **Fable 5**; pick 5.1 explicitly in `/model` there.
|
||||
|
||||
> **Fast Mode runs on Opus 5 and Opus 4.8 (v2.1.219)**: As of v2.1.219, `/fast` applies to **Opus 5 and Opus 4.8** — Opus 4.7 was removed from fast mode. Opus 5's fast mode is billed at $10/$50 per Mtok. Fast mode first moved to Opus 4.8 in v2.1.154 (about 2× the standard rate for ~2.5× the output speed), having flipped from Opus 4.6 to Opus 4.7 in v2.1.142. The `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE` env var was **deprecated in v2.1.154 and removed on 2026-06-01**; fast mode is no longer available on Opus 4.6 — select Opus 5 or Opus 4.8 instead.
|
||||
> **Fast Mode runs on Opus 5 and Opus 4.8 (v2.1.219)**: As of v2.1.219, `/fast` applies to **Opus 5 and Opus 4.8** — Opus 4.7 was removed from fast mode. Opus 5's fast mode is billed at $10/$50 per Mtok. Fast mode first moved to Opus 4.8 in v2.1.154 (about 2× the standard rate for ~2.5× the output speed), having flipped from Opus 4.6 to Opus 4.7 in v2.1.142. The `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE` env var was **deprecated in v2.1.154 and removed on 2026-06-01**; fast mode is no longer available on Opus 4.6 — select Opus 5 or Opus 4.8 instead. **Since v2.1.280, fast mode defaults to Opus 5.5** ($8/$40 per Mtok); Opus 5 and Opus 4.8 remain supported at $10/$50.
|
||||
|
||||
### Effort Levels (Opus 5 / Sonnet 5 / Opus 4.8 / Opus 4.7)
|
||||
|
||||
Opus 5, Sonnet 5, Opus 4.8, and Opus 4.7 support adaptive reasoning with effort levels, ordered from lightest to heaviest: `low` (○), `medium` (◐), `high` (●), `xhigh`, and `max`. The **default** is `high` on Opus 5, Sonnet 5, Opus 4.8 (since v2.1.154), Opus 4.6, and Sonnet 4.6, and `xhigh` on Opus 4.7. `xhigh` is available on Opus 5, Sonnet 5, Opus 4.8, and Opus 4.7; `max` works on Opus 5, Sonnet 5, Opus 4.8/4.7/4.6 and Sonnet 4.6 (session-only). Haiku 4.5 has no effort levels. On Opus 4.6 / Sonnet 4.6, the default effort for Pro/Max subscribers was raised from `medium` to `high` in v2.1.117.
|
||||
Opus 5, Sonnet 5, Opus 4.8, and Opus 4.7 support adaptive reasoning with effort levels, ordered from lightest to heaviest: `low` (○), `medium` (◐), `high` (●), `xhigh`, and `max`. Opus 5.5 supports all five levels too. The **default** is `medium` on Opus 5.5 (the default model since v2.1.280) and `high` on Opus 5, Sonnet 5, Opus 4.8 (since v2.1.154), Opus 4.6, and Sonnet 4.6, and `xhigh` on Opus 4.7. `xhigh` is available on Opus 5.5, Opus 5, Sonnet 5, Opus 4.8, and Opus 4.7; `max` works on Opus 5.5, Opus 5, Sonnet 5, Opus 4.8/4.7/4.6 and Sonnet 4.6 (session-only). Haiku 4.5 has no effort levels. On Opus 4.6 / Sonnet 4.6, the default effort for Pro/Max subscribers was raised from `medium` to `high` in v2.1.117.
|
||||
|
||||
```bash
|
||||
# Set effort level via CLI flag
|
||||
@@ -847,7 +848,7 @@ The "ultrathink" keyword in prompts activates deep reasoning. The `/effort` menu
|
||||
| `ANTHROPIC_DEFAULT_SONNET_MODEL` | Override default Sonnet model ID |
|
||||
| `ANTHROPIC_DEFAULT_HAIKU_MODEL` | Override default Haiku model ID |
|
||||
| `MAX_THINKING_TOKENS` | Set extended thinking token budget |
|
||||
| `CLAUDE_CODE_EFFORT_LEVEL` | Set effort level (`low`/`medium`/`high`/`xhigh`/`max`) — default is `high` on Opus 5, Sonnet 5, and Opus 4.8 (`xhigh` on Opus 4.7); `xhigh` needs Opus 5, Sonnet 5, or Opus 4.8/4.7; `max` works on Opus 5, Sonnet 5, Opus 4.8/4.7/4.6 and Sonnet 4.6 |
|
||||
| `CLAUDE_CODE_EFFORT_LEVEL` | Set effort level (`low`/`medium`/`high`/`xhigh`/`max`) — default is `medium` on Opus 5.5, `high` on Opus 5, Sonnet 5, and Opus 4.8 (`xhigh` on Opus 4.7); `xhigh` needs Opus 5.5, Opus 5, Sonnet 5, or Opus 4.8/4.7; `max` works on Opus 5.5, Opus 5, Sonnet 5, Opus 4.8/4.7/4.6 and Sonnet 4.6 |
|
||||
| `CLAUDE_CODE_SIMPLE` | Minimal mode, set by `--bare` flag |
|
||||
| `CLAUDE_CODE_SAFE_MODE` | Set to `1` to start with all customizations disabled (CLAUDE.md, plugins, skills, hooks, MCP) — env-var form of `--safe-mode`, for isolating config problems (v2.1.169) |
|
||||
| `CLAUDE_CODE_DISABLE_BUNDLED_SKILLS` | Set to `1` to hide the bundled skills, workflows, and commands from the model (v2.1.169) |
|
||||
@@ -902,7 +903,8 @@ The "ultrathink" keyword in prompts activates deep reasoning. The `/effort` menu
|
||||
| `CLAUDE_CODE_MCP_STARTUP_WAIT_MS` | Bounds how long the first non-interactive turn waits for MCP servers that are still connecting. Set `0` to not wait at all (v2.1.274) |
|
||||
| `CLAUDE_CODE_WEBFETCH_DEADLINE_MS` | Overrides WebFetch's 300-second deadline, introduced in v2.1.268. Set `0` to disable the deadline (v2.1.268) |
|
||||
| `CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS` | Raises the Workflow tool's per-run concurrent agent limit. Accepts 1–256 (v2.1.269) |
|
||||
| `CLAUDE_CODE_AUTO_MODE_SERVER` | Set to `0` to opt out of server-side auto-mode checks on Bedrock, Vertex, Foundry, and gateways (v2.1.278) |
|
||||
| `CLAUDE_CODE_AUTO_MODE_SERVER` | Set to `0` to use Claude Code's own auto-mode classifier requests instead of server-side review — on Bedrock, Vertex, Foundry, and gateways since v2.1.278, and on a direct Anthropic API connection since v2.1.281 (there the local classifier then counts toward usage, and `1` opts in) |
|
||||
| `CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT` | Set to `1` to turn off the 2-minute timeout on the dangerous `rm` prompt in `--dangerously-skip-permissions` and auto mode, which otherwise denies the command with a rewrite hint so unattended sessions keep going (v2.1.281) |
|
||||
| `CLAUDE_CODE_ENABLE_TODO_TOOLS` | Set to `1` to restore the todo/task-tracking tools (`TaskCreate`/`Get`/`Update`/`List`, `TodoWrite`), which are available by default only on Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5 (v2.1.268) |
|
||||
| `CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS` | How long WebFetch caches a fetched URL. Default 15 minutes (v2.1.233) |
|
||||
| `CLAUDE_CODE_TOOL_MEMORY_LIMIT` | Linux only: opt in to a memory cgroup applied to Bash commands (v2.1.233) |
|
||||
@@ -920,6 +922,8 @@ The "ultrathink" keyword in prompts activates deep reasoning. The `/effort` menu
|
||||
|
||||
> **`ENABLE_TOOL_SEARCH` on Vertex AI (v2.1.119+)**: Tool search is **disabled by default on Google Cloud Vertex AI** deployments. Users who want the tool-search capability on Vertex must explicitly opt in with `export ENABLE_TOOL_SEARCH=true`. On direct Anthropic API it remains enabled by default.
|
||||
|
||||
> **OpenTelemetry variables in project settings (v2.1.282)**: project and local settings ignore OpenTelemetry variables that turn on export, set its endpoint, or capture content, such as `CLAUDE_CODE_ENABLE_TELEMETRY` and `OTEL_LOG_*`.
|
||||
|
||||
---
|
||||
|
||||
## Settings.json Keys
|
||||
@@ -940,12 +944,16 @@ These keys live in a `settings.json` file (`~/.claude/settings.json` for user sc
|
||||
| `promptCacheTtl` | (v2.1.243) Choose the prompt cache lifetime for the main conversation. |
|
||||
| `subagentPromptCacheTtl` | (v2.1.243) The same choice for subagents and other requests outside the main conversation. |
|
||||
| `modelPricing` | (v2.1.243) **Managed setting.** Supplies your organization's contracted rates so `/cost`, the status line, and telemetry report those instead of list price. |
|
||||
| `availableModelsMatch` | (v2.1.283) **Managed setting.** With `"exact"`, an `availableModels` entry allows only the model version it names, so new releases stay blocked until listed. |
|
||||
| `deniedModels` | (v2.1.283) **Managed setting.** Blocks specific models, even when `availableModels` allows them. |
|
||||
| `keybindingFlavor` | **Deprecated since v2.1.261 and has no effect.** The prompt's word-editing keys always follow readline conventions, as Bash does: `Ctrl+W` deletes back to whitespace, `Alt+F` and `Alt+D` stop at word end, and punctuation separates words. Claude Code still accepts the key, so a settings file that sets it stays valid. (In v2.1.238–v2.1.260 it chose between `"classic"` and `"readline"`.) |
|
||||
| `bashOutputMaxChars` | (v2.1.261) How many characters of a **successful** Bash or PowerShell command's output Claude receives inline, up to 128K. Past the limit Claude Code saves the output to a file and Claude gets a short preview plus the path. Setting it makes Claude Code ignore `BASH_MAX_OUTPUT_LENGTH`. |
|
||||
| `taskOutputMaxChars` | (v2.1.261) **Superseded in v2.1.278 and has no effect.** It used to cap how many characters of a **background task's** output Claude received inline when reading it with the `TaskOutput` tool. v2.1.278 removed the `TaskOutput` tool — Claude now reads a background task's output file with `Read` — so this key and `TASK_MAX_OUTPUT_LENGTH` are both inert. Claude Code still accepts the key, so a settings file that sets it stays valid. |
|
||||
| `maxEffortLevel` | (v2.1.267) Caps the effort level Claude Code may use, on every provider including Bedrock, Vertex, and Foundry. Set it top-level or per-model under `modelSettings`. Users can still pick a lower level. |
|
||||
| `bashEditDiffEnabled` | (v2.1.269) Bash tool results include a diff of the files the command changed. |
|
||||
| `syncClaudeAiSkills` / `syncClaudeAiPlugins` | (v2.1.275) Set either to `false` to opt out of syncing the skills or plugins you have enabled on your claude.ai account into terminal sessions. |
|
||||
| `attribution` | (v2.1.281) Set `"attribution": false` to hide all commit and PR attribution. Older CLI versions skip a settings file that holds it, so keep the object form in files shared across versions. |
|
||||
| `maxProseWidth` | (v2.1.282) Caps the width of Claude's prose in wide terminals; tables and code blocks keep the full width. |
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -1059,8 +1067,8 @@ claude -p --output-format json "query"
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: September 19, 2026
|
||||
**Claude Code Version**: 2.1.278
|
||||
**Last Updated**: September 26, 2026
|
||||
**Claude Code Version**: 2.1.283
|
||||
**Sources**:
|
||||
- https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md
|
||||
- https://code.claude.com/docs/en/workflows#set-a-size-guideline
|
||||
@@ -1088,4 +1096,8 @@ claude -p --output-format json "query"
|
||||
- https://code.claude.com/docs/en/cli-reference.md
|
||||
- https://code.claude.com/docs/en/settings.md
|
||||
- https://code.claude.com/docs/en/settings-reference
|
||||
- https://code.claude.com/docs/en/fast-mode
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.281
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.282
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.283
|
||||
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
Reference in new issue
Block a user