Skip to main content
This event is fired when a user decides an approval a custom agent asked for. Subscribe to it so your agent resumes on a decision instead of polling the discussion. status is APPROVED or DENIED, and reviewerNote is what the user typed, or null. On DENIED, Plain has already failed the gated tool call and set reviewerNote as its error, so do not report an error on that call yourself: feed the note back to your model and try again under a new toolCallId. discussion.agentStatus tells you where the discussion is now. It stays TOOL_CALL_APPROVAL_PENDING while another approval is open, and otherwise it is IN_PROGRESS if any tool call is still PENDING or IDLE if none is. An approval a user has approved leaves its own call PENDING for you to run, so a lone approval reads IN_PROGRESS and a lone denial reads IDLE.

Schema

View JSON Schema → Example:

Using the Webhooks SDK

You can use the @team-plain/webhooks package to parse and verify this event with full type safety: