Claude Code 2.0.41-2.0.47 Release Notes
π Version Overview
This article summarizes the important updates in Claude Code versions 2.0.41 through 2.0.47, covering new features, improvements, and bug fixes across six releases.
π― Highlights
- β¨ PermissionRequest Hook: Automated permission approval mechanism
- βοΈ Azure AI Foundry Support: New cloud platform integration
- π§ Subagent Hooks Enhancement: More complete lifecycle control
- π Background Task Sending: Support for background execution on web
- π Extensive Bug Fixes: Improved stability and user experience
β¨ New Features
1. PermissionRequest Hook (v2.0.45)
The new PermissionRequest Hook allows you to automatically approve or deny tool permission requests using custom logic, significantly improving automation workflow efficiency.
graph TD
A[Tool Requests Permission] --> B{PermissionRequest Hook}
B -->|Auto Approve| C[Execute Tool]
B -->|Auto Deny| D[Stop Execution]
B -->|No Hook Config| E[Ask User]
style A fill:#e1f5fe
style C fill:#c8e6c9
style D fill:#ffcdd2
style E fill:#fff3e0
Use Cases:
- Auto-authorize specific tools or paths
- Require manual confirmation for sensitive operations
- Establish hierarchical permission management strategies
Configuration Example:
// .claude/hooks/permission-request.ts
export default async function({ tool, parameters }) {
// Auto-approve read operations
if (tool === 'Read' && parameters.file_path.startsWith('/safe/')) {
return { approved: true };
}
// Deny writes to sensitive files
if (tool === 'Write' && parameters.file_path.includes('secret')) {
return { approved: false, reason: 'Sensitive files cannot be modified' };
}
// Let user decide for other cases
return { approved: null };
}
π‘ Further Reading: Hooks System and Migration Guide
2. Azure AI Foundry Support (v2.0.45)
Claude Code now supports the Azure AI Foundry platform! You can use Claude models in your Azure cloud environment.
Quick Start:
- Set up Claude model endpoints in Azure AI Foundry
- Configure Claude Code’s Azure credentials
- Use via standard CLI or API
π Official Documentation: Azure AI Foundry Setup Guide
3. Subagent Hooks Enhancement (v2.0.42 & v2.0.43)
v2.0.42: New Fields in SubagentStop Hook
interface SubagentStopHookInput {
agent_id: string; // New: Agent ID
agent_transcript_path: string; // New: Full conversation transcript path
// ... other existing fields
}
v2.0.43: New SubagentStart Hook
// Triggered when subagent starts
export default async function(input: SubagentStartHookInput) {
console.log(`Subagent ${input.subagent_type} started`);
// Can be used for logging, monitoring, or initialization
}
Value:
- Complete subagent lifecycle tracking (Start β Stop)
- Access full conversation transcripts for analysis
- Implement agent-level monitoring and logging
π‘ Further Reading: Subagents and Plan Mode
4. Send Background Tasks to Web (v2.0.45)
Add the & symbol at the beginning of a message to send background tasks to Claude Code Web for execution.
# In CLI
& Run long-running data processing task
# Task will run in web background, CLI can continue other work
Suitable Scenarios:
- Long-running tests or builds
- Large codebase analysis
- Tasks requiring continuous monitoring
π§ Improvements
Hook System Improvements
v2.0.41: Prompt-based Stop Hooks Support Custom Model
# .claude/settings.json
{
"hooks": {
"stop": {
"model": "haiku" # New: Specify model for hook evaluation
}
}
}
v2.0.43: New tool_use_id Field
interface PreToolUseHookInput {
tool_use_id: string; // New: Unique tool call identifier
// ...
}
v2.0.43: SDK Custom Timeout Support
// Custom hook execution timeout
{
"hooks": {
"timeout": 30000 // 30 seconds
}
}
Skills System Improvements (v2.0.43)
New skills frontmatter field to auto-load specified skills for subagents:
# custom-agent.yaml
skills:
- pdf-processor
- data-analyzer
Benefits:
- Reduce redundant configuration
- Ensure subagents have necessary capabilities
- Improve task execution efficiency
Permission and Security Improvements (v2.0.41)
Expanded list of safe git commands that don’t require approval, reducing unnecessary permission prompts:
# Following commands can run without user approval
git add
git rm
git submodule
# ... and other safe operations
Custom Agent Permission Mode (v2.0.43)
New permissionMode field allows setting permission policies for custom agents:
# custom-agent.yaml
permissionMode: "auto" # Options: auto, ask, deny
π Bug Fixes
v2.0.41
- β Fixed slash commands from user settings being loaded twice, causing rendering issues
- β Fixed incorrect labeling of user settings vs project settings in command descriptions
- β Fixed crash when plugin command hooks timeout during execution
- β
Fixed Bedrock users seeing duplicate Opus entries with
--model haiku - β Fixed broken security documentation links in trust dialogs and onboarding
- β Fixed pressing ESC to close diff modal also interrupting the model
- β ctrl-r history search landing on slash command no longer cancels search
v2.0.43
- β
Fixed nested
CLAUDE.mdfiles not loading when @-mentioning files - β Fixed duplicate rendering of some messages in UI
- β Fixed some visual flickers
- β
Fixed
NotebookEdittool inserting cells at incorrect positions when cell IDs matchcell-Npattern
v2.0.45
No new bug fixes (primarily a feature release)
v2.0.46
- β Fixed image files being reported with incorrect media type when format cannot be detected from metadata
v2.0.47
- β
Improved error messages and validation for
claude --teleport - β
Improved error handling in
/usagecommand - β Fixed race condition with history entry not getting logged at exit
- β
Fixed Vertex AI configuration not being applied from
settings.json
π‘ Best Practices
1. Leverage PermissionRequest Hook
Recommended Configuration Strategy:
// Hierarchical permission management
export default async function({ tool, parameters }) {
// Layer 1: Fully trusted paths
if (isTrustedPath(parameters.file_path)) {
return { approved: true };
}
// Layer 2: Read-only operations
if (isReadOnlyTool(tool)) {
return { approved: true };
}
// Layer 3: Require manual confirmation
return { approved: null };
}
2. Monitor Subagent Lifecycle
Implement complete monitoring using new hook fields:
// SubagentStart Hook
export default async function(input) {
await logStart(input.subagent_type, input.agent_id);
}
// SubagentStop Hook
export default async function(input) {
await logStop(input.agent_id);
await analyzeTranscript(input.agent_transcript_path);
}
3. Upgrade Considerations
- π Check if using deprecated Output Styles (refer to v2.0.30 Migration Guide)
- π Update hook implementations to utilize new fields (
agent_id,tool_use_id, etc.) - π If using Azure, refer to official documentation for setup
- π Test PermissionRequest Hook to ensure permission logic is correct
π Related Resources
Official Documentation
Article Series
- Claude Code 2.0 - Skills and Sandbox
- Claude Code 2.0 - Subagents and Plan Mode
- Claude Code 2.0 - Hooks System and Migration Guide
- Claude Code Output Styles Comprehensive Guide
π Summary
Versions 2.0.41-2.0.47 bring practical permission management automation (PermissionRequest Hook), cloud platform expansion (Azure AI Foundry), and extensive stability improvements. All users are recommended to upgrade to the latest version and explore new hook features to optimize workflows.
Upgrade Recommendation:
# Update to latest version
claude update
For any questions or suggestions, please refer to the official documentation or discuss in the community!