You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(guardrails): publish input_payload at POST on decorator escalation path [AL-289]
The decorator adapter's _run_action published only scope/stage/component, so a
POST escalation left EscalateAction's Inputs empty — the reviewer saw the flagged
output but not the original input (unlike the middleware path). Publish
input_payload at the tool/LLM/agent POST sites so Inputs carries the original
input alongside Outputs. Align the decorator test/docs to the Inputs/Outputs and
ReviewedOutputs naming the middleware path already uses.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/guardrails.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -446,7 +446,7 @@ def create_my_agent():
446
446
agent = create_my_agent()
447
447
```
448
448
449
-
On resume: **Approve** continues (substituting `ReviewedInputs`if the reviewer edited the input, otherwise keeping the original); **Reject** raises `GuardrailBlockException` and terminates the run. The `app_name` / `app_folder_path` / `assignee` / `recipient` / `title` parameters and the auto-derived payload fields behave identically to the [middleware escalation action](#escalation-action-human-in-the-loop) above — refer to it for the full parameter list.
449
+
On resume: **Approve** continues, substituting the reviewer's edit if any — read from `ReviewedInputs`for a PRE (input) escalation and `ReviewedOutputs` for a POST (output) one, otherwise keeping the original; **Reject** raises `GuardrailBlockException` and terminates the run. The `app_name` / `app_folder_path` / `assignee` / `recipient` / `title` parameters and the auto-derived payload fields behave identically to the [middleware escalation action](#escalation-action-human-in-the-loop) above — refer to it for the full parameter list.
450
450
451
451
> 💡 **Scope inference for the payload context.**`Component` / `ExecutionStage` are derived automatically for the adapter-handled LangChain targets — `@tool`, `BaseChatModel` factories, and `create_agent()` factories. On a plain LangGraph node or plain Python function (handled by the core `@guardrail`, which doesn't publish the LangChain runtime context) the escalation still suspends, but those two fields are not populated.
0 commit comments