I'm building a simple agent that can call tools, e.g. `send_email(to_user_id, subject, body)`. Sometimes the model passes the wrong user ID — it picks an ID it saw in the conversation instead of the right one. I validate arguments in code, but by then the wrong call has already been attempted. Is there a standard pattern for this? For example, should sensitive identifiers be resolved server-side (from the session) instead of letting the model...
Originally asked by American on Stack Exchange (stackoverflow) (CC BY-SA 4.0).
Variant 769.