What to Check
For a coding assistant, send Events for:Basic Flow
- Check the user’s coding request.
- Check tool arguments before high-risk tool execution.
- Check tool output before it is summarized or sent back to the model.
- Check the assistant’s final response or code diff.
- Store returned
internal_event_idvalues for exact lookup.
Example: Check a User Prompt
Example: Check Tool Arguments
Example: Check Tool Output
Example: Check Assistant Response
Batch a Coding Step
Send related Events together when you want one response for the full step:Recommended IDs
Best Practices
Check before executing risky tools
Check before executing risky tools
Send
tool.arguments before shell commands, database queries, file deletion, network requests, or other sensitive operations.Check tool output before summarizing it
Check tool output before summarizing it
Tool output can contain secrets, private data, unsafe code, or prompt injections. Check it before sending it back to your model or user.
Use separate Event IDs for separate checks
Use separate Event IDs for separate checks
Give the user prompt, tool arguments, tool output, and assistant response different
event_id values so you can inspect exactly what was flagged.Next Steps
Events API
Learn the full Events model.
Check Multiple Events
Batch a coding step in one request.
Get Event Results
Retrieve exact or latest Event results.
Policies
Define what should be flagged for coding assistants.
