II.
OutputGuard overview
Reference · liveoutput-guard:claude-code-aup-refusal
Claude Code AUP refusal guard overview
Detects BetaStopReason='refusal' on a completed assistant turn. Logs tengu_refusal_api_response and replaces the assistant content with the AUP-pointing message (https://www.anthropic.com/legal/aup), plus a /model claude-sonnet-4-20250514 switch suggestion when the active model is not already that variant. Marked as an isApiErrorMessage with error='invalid_request' so downstream UI treats it as a non-retryable block-call.
Attributes
displayName
Claude Code AUP refusal guard
appliesTo
assistant-text
phase
post-call
detectorKinds
- refusal-stop-reason
- aup-violation
onTrigger
rewrite
severity
block-call
description
Detects BetaStopReason='refusal' on a completed assistant turn. Logs
tengu_refusal_api_response and replaces the assistant content with the
AUP-pointing message (https://www.anthropic.com/legal/aup), plus a
/model claude-sonnet-4-20250514 switch suggestion when the active model
is not already that variant. Marked as an isApiErrorMessage with
error='invalid_request' so downstream UI treats it as a non-retryable
block-call.
Outgoing edges
None.
Incoming edges
output_guard_applied_by2
- agent-core-impl:claude-code.core@1.x·AgentCoreImplClaude Code Core (1.x)
- agent-runtime-impl:claude-code.runtime@1.x·AgentRuntimeImplClaude Code Runtime (1.x)