Skills
Claude Code 2.1.89: Defer Hook Enables Human-in-the-Loop for Headless CI/CD Pipelines
Claude Code CLI 2.1.89 added a 'defer' permission decision to PreToolUse hooks — headless sessions now pause at a tool call and exit with stop_reason 'tool_deferred', preserving the pending call in the transcript. The calling CI/CD system reads deferred_tool_use from the SDK result, surfaces it in its own UI, and resumes with 'claude -p --resume <session-id>'. Also added PermissionDenied hook that fires after auto-mode classifier denials with retry capability. This is the first production-ready human-in-the-loop pattern for Claude Code in automated pipelines.
↳ Follow the thread