[DOCS] Hooks reference missing `effort.level` JSON field and `$CLAUDE_EFFORT` environment variable
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/hooks
Section/Topic
- "Hook input and output" section — Common input fields table (lines ~516–549)
- "Command hook fields" section — environment variable documentation missing
- JSON input schema examples throughout the Hook events section
Current Documentation
The Hooks reference documents the common input fields that hooks receive via stdin JSON, including session_id, transcript_path, cwd, permission_mode, and hook_event_name. The reference also documents environment variables available to hook commands, such as $CLAUDE_PROJECT_DIR and $CLAUDE_CODE_REMOTE.
However, the documentation does NOT mention:
- The
effort.levelfield in the JSON input that reports the active effort level (low,medium,high,xhigh, ormax) - The
$CLAUDE_EFFORTenvironment variable available to Bash tool commands and hook scripts
The changelog for v2.1.133 states:
Hooks now receive the active effort level via theeffort.levelJSON input field and the$CLAUDE_EFFORTenvironment variable, and Bash tool commands can read$CLAUDE_EFFORT
What's Wrong or Missing?
A. effort.level missing from hook JSON input schema
Hooks receive the active effort level in their JSON input, but the "Common input fields" table and individual hook event schemas do not document effort.level. Users writing hooks that need to adapt behavior based on effort level (e.g., higher verbosity for max effort) have no way to discover this field from the official docs.
B. $CLAUDE_EFFORT missing from environment variable documentation
The Hooks reference documents $CLAUDE_PROJECT_DIR and $CLAUDE_CODE_REMOTE as available environment variables, but does not mention $CLAUDE_EFFORT. This env var is available to Bash tool commands generally (per the changelog), but hook script authors would benefit from explicit documentation that it is available inside hook command context.
Suggested Improvement
Add effort.level to the "Common input fields" table in the Hooks reference:
| Field | Description |
| :---- | :---------- |
| effort.level | Current reasoning effort (low, medium, high, xhigh, or max). Reflects the live session value, including mid-session /effort changes. Absent when the current model does not support the effort parameter |
Document $CLAUDE_EFFORT in the "Reference scripts by path" section alongside $CLAUDE_PROJECT_DIR:
$CLAUDE_EFFORT: the current effort level (low,medium,high,xhigh, ormax). Useful for hooks that need to adjust behavior based on the active effort setting.
Impact
High - Prevents users from using a feature
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/hooks | Primary documentation location — "Common input fields" table and "Reference scripts by path" section |
| https://code.claude.com/docs/en/changelog | v2.1.133 changelog confirms the feature exists |
| https://code.claude.com/docs/en/statusline | effort.level documented for status line but not linked from hooks docs |
Total scope: 1 page affected (Hooks reference)
The effort.level field is already documented in the Status line reference with description: "Current reasoning effort (low, medium, high, xhigh, or max). Reflects the live session value, including mid-session /effort changes." The same field should be documented in the Hooks reference as part of the common input fields.
The $CLAUDE_EFFORT variable is documented in slash-commands.md and skills.md for use in skill instructions, but the same variable's availability in hook command context is not documented in the Hooks reference.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗