{"version":"1.0.24","anchor":"new-features","canonical_anchor":"new-features","heading":"New Features","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/1.0.24\/e\/new-features","release_url":"https:\/\/changelogs.core-directive.com\/v\/1.0.24","markdown":"### New Features\n\nTool Execution Hooks\n\nVersion 1.0.24 introduces a powerful hooks system that allows you to run custom commands before and after tool executions. This feature enables advanced workflows, custom validations, and integrations.\n\n**Configuration:** Add hooks to your `~\/.claude\/claude.json` file:\n\n`{ \"hooks\": { \"PreToolUse\": [ { \"matcher\": \"Edit|Write\", \"hooks\": [ { \"type\": \"command\", \"command\": \"pre-edit-validator.sh\" } ] } ], \"PostToolUse\": [ { \"matcher\": \"Bash\", \"hooks\": [ { \"type\": \"command\", \"command\": \"log-bash-commands.sh\" } ] } ] } }` **Hook Types:**\n\n- **PreToolUse**: Executes before a tool runs\n- Receives tool arguments as JSON input\n- Exit code 0: Continues normally (output not shown)\n- Exit code 2: Shows stderr to Claude and blocks the tool execution\n- Other exit codes: Shows stderr to user but continues\n\n- **PostToolUse**: Executes after a tool completes\n- Receives JSON with \"inputs\" (tool arguments) and \"response\" (tool result)\n- Exit code 0: Output shown in transcript mode (Ctrl-R)\n- Exit code 2: Shows stderr to Claude immediately\n- Other exit codes: Shows stderr to user only\n\n- **Notification**: Triggers when notifications are sent\n\n**Example Use Cases:**\n\n- Pre-commit hooks before file edits\n- Security validation before running commands\n- Logging and auditing tool usage\n- Custom linting or formatting checks\n- Integration with external systems\n\nOAuth Flow Improvements\n\nThe OAuth authentication flow now provides better visibility into the authorization process:\n\n- The authorization URL is now accessible programmatically during the flow\n- Improved error handling for OAuth client configuration issues\n- Better cleanup of invalid OAuth credentials when authentication fails"}