docs: sync to Claude Code v2.1.170 (#140)

* docs: sync to Claude Code v2.1.170

Additive sync covering features shipped in v2.1.161-2.1.170. No breaking
changes in the window.

- 10-cli: add Claude Fable 5 model row (claude-fable-5); --safe-mode flag
  + CLAUDE_CODE_SAFE_MODE / CLAUDE_CODE_DISABLE_BUNDLED_SKILLS env vars;
  note --fallback-model now applies to interactive sessions (v2.1.166)
- 01-slash-commands: document /cd (preserves prompt cache, v2.1.169)
- 03-skills: document disableBundledSkills setting + env var (v2.1.169)
- 07-plugins: document /plugin list --enabled/--disabled (v2.1.163)
- 06-hooks: document Stop/SubagentStop additionalContext return (v2.1.163)
- 09-advanced-features: add Safe Mode + fallbackModel subsections
- 05-mcp: stdio servers receive CLAUDE_CODE_SESSION_ID on --resume (v2.1.161);
  add metadata footer (none existed)
- refresh footers on all edited files to 2.1.170 / June 10, 2026

* fix(mcp): correct CLAUDE_CODE_SESSION_ID --resume version to 2.1.163
This commit is contained in:
Luong NGUYEN
2026-06-10 08:19:13 +02:00
committed by GitHub
parent fcdc0887f1
commit 733c0882c3
8 changed files with 93 additions and 17 deletions

View File

@@ -370,6 +370,17 @@ Run when Claude finishes responding (Stop) or a subagent completes (SubagentStop
> **Safety cap on consecutive blocks (v2.1.143)**: If a `Stop` hook returns `"decision": "block"` (or sets `continue: false`) **8 times in a row** for the same turn, Claude Code short-circuits the loop and ends the session with a warning. Override the threshold with the env var `CLAUDE_CODE_STOP_HOOK_BLOCK_CAP=<integer>` (set to `0` to disable the cap entirely). This prevents a buggy Stop hook from looping the session forever.
**Return field (v2.1.163):** A `Stop` or `SubagentStop` hook can return `hookSpecificOutput.additionalContext` to give Claude feedback and **continue the turn without surfacing an error label**. Previously, influencing the model from a Stop hook was awkward; now the hook can inject context cleanly, avoiding the error-label behavior of older feedback paths (such as `"decision": "block"`).
```json
{
"hookSpecificOutput": {
"hookEventName": "Stop",
"additionalContext": "Reminder: run the test suite before declaring done."
}
}
```
### SubagentStart
Runs when a subagent begins execution. The matcher input is the agent type name, allowing hooks to target specific subagent types.
@@ -1449,8 +1460,8 @@ Edit `~/.claude/settings.json` or `.claude/settings.json` with the hook configur
---
**Last Updated**: June 2, 2026
**Claude Code Version**: 2.1.160
**Last Updated**: June 10, 2026
**Claude Code Version**: 2.1.170
**Sources**:
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/changelog