Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

My AI agent sent emails I did not want it to send

Short answer

An agent that can send email will act on what it reads, and text inside an inbound email can contain instructions aimed at it. Anthropic advises treating that content as untrusted, limiting permissions to the minimum and screening outputs. For anything that leaves your company, require a person's approval.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • It replied to someone it should have ignored.
  • A customer received an odd message from us.
  • The agent emailed a list of people.
  • It forwarded internal content.
  • I do not know why it chose to send.

Why does this happen?

  1. Inbound text can contain instructions

    Anthropic describes indirect prompt injection: third-party content such as an email body can contain adversarial instructions that try to redirect the model.

  2. The agent had too much access

    Anthropic advises least privilege: do not give the model secrets it does not need, and scope permissions as narrowly as possible so a successful injection can do minimal damage.

  3. Nothing separates drafting from sending

    If the same step writes and sends, there is no moment where a person can stop a wrong message.

  4. Rules were only in the prompt

    An instruction such as do not email outsiders is advice to the model, not a technical block. A real block belongs in the code that sends.

What can I do about it today?

  1. Disable sending nowRemove the agent's send permission or switch the mailbox connection off, and leave the rest of the setup in place.
  2. List what went outExport sent items for the period and note recipients.
  3. Warn affected people if neededA short, honest correction from you, written by a person.
  4. Change the credentialsIf the agent used a shared mailbox login, reset it through your email provider.
  5. Check privacy dutiesIf personal data went to the wrong people, ask your adviser what you must report.

When should I bring someone in?

  • Confidential or personal data was sent.
  • Customers or suppliers received false commitments.
  • You cannot tell what the agent can access.

How do I handle it?

  1. Remove standing accessThe agent gets only the access its job needs, and sending is not part of it by default.
  2. Put drafts in front of a personThe agent prepares an email and a person approves it, at least at first.
  3. Enforce rules in codeAllowed recipients, daily numbers and blocked content are checked by the sending code, not the prompt.
  4. Treat inbound text as dataContent from emails is passed as untrusted material, as Anthropic's guidance describes.
  5. Test with hostile emailsI write test emails that contain instructions and check the agent ignores them.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Can a prompt alone stop this?

No. Anthropic recommends layers including permission limits and screening, so the sending code should also enforce rules.

Should the agent never send?

For many businesses, drafting for approval is the safe starting point.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.