Tutorials · Claude Agent SDK · examples / outputs / p7_deferred_approval.txtExample code

Example code · outputs

p7_deferred_approval.txt

Captured output of p7_deferred_approval

Raw fileDownload all examples (zip)See the script →

  [hook] './deploy.sh' needs human approval: defer
  run 1: subtype=success stop_reason='tool_deferred' deferred=Bash('./deploy.sh')
  ... the process could exit here; hours pass; a human approves in your UI ...
  [hook] approval found for './deploy.sh': allow
  run 2: subtype=success stop_reason='end_turn'

final: success -> 'Deploy ran successfully. It printed:\n\n```\ndeploying version 1.2.3 to production\n```'

8 lines · Back to the folder