# AI spam bot says it is not spam but scan log says it is spam

**URL:** https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375
**Category:** Bug
**Tags:** ai
**Created:** [August 20, 2025, 12:20am UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375 "2025-08-20T00:20:48Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![J-Ha\_Hasegawa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j-ha_hasegawa/32/518294_2.png) [@J-Ha\_Hasegawa](https://meta.discourse.org/u/J-Ha_Hasegawa)
#### Post date: [August 20, 2025, 12:20am UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/1 "2025-08-20T00:20:48Z")

</div>

I’ve enabled the Discourse AI spam handling on our forum. I’ve set up Claude Sonnet 4 with an API key and selected the Spam detector persona.

I did a test post that is clearly spam. Nothing subtle about it.

It was not blocked and was posted immediately.

When I gave the post URL to the spam bot using the test feature, the result says Not spam, but in the Scan log it says: SPAM - This is a clear promotional advertisement…

 ![CleanShot 2025-08-19 at 17.05.24@2x](https://global.discourse-cdn.com/meta/original/4X/3/d/6/3d67b81a41d4dff34116274811c585445ffaad71.png)

My expectation would be that the result would be SPAM, matching the Scan log declaration of SPAM. And that this would then queue up the post for review by admins and moderators, for example.

Might anyone be able to share what I’m missing? I’m no expert – so am open to any guidance!

Thank you!

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [August 20, 2025, 12:34am UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/2 "2025-08-20T00:34:56Z")

</div>

What is the trust level of the user who posted? AI Spam will skip posts from TL2+ users.

Regarding the test, there’s a bug in the test code and it should say “spam.” I’ll work on a fix.

---

<div class="post-metadata">

### Author: ![J-Ha\_Hasegawa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j-ha_hasegawa/32/518294_2.png) [@J-Ha\_Hasegawa](https://meta.discourse.org/u/J-Ha_Hasegawa)
#### Post date: [August 20, 2025, 12:48am UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/4 "2025-08-20T00:48:28Z")

</div>

Thank you for your reply!

The user I used to post is **Trust Level new user**

Any thoughts on why the post made it through?

I appreciate your help!

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [August 20, 2025, 5:09pm UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/5 "2025-08-20T17:09:31Z")

</div>

This will fix both the test and the post not getting flagged:

[https://github.com/discourse/discourse/pull/34442](https://github.com/discourse/discourse/pull/34442)

The Spam detector Persona system prompt was confusing Claude models. The change makes the expected response format instructions more explicit.

---

<div class="post-metadata">

### Author: ![J-Ha\_Hasegawa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j-ha_hasegawa/32/518294_2.png) [@J-Ha\_Hasegawa](https://meta.discourse.org/u/J-Ha_Hasegawa)
#### Post date: [August 22, 2025, 1:33am UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/6 "2025-08-22T01:33:12Z")

</div>

Ah, fantastic! The test feature is working as expected.

I am wondering if you might be able to help with why the AI Spam feature is still not blocking a spammy post from being immediately posted? I sent the post to the AI Spam test and it is flagging it as spam - but it was posted.

Am I missing a connecting piece perhaps? Thank you so much for your help with this!

 ![CleanShot 2025-08-21 at 18.30.15@2x](https://global.discourse-cdn.com/meta/original/4X/1/d/c/1dcdc5596cd5d4645e6e51e73b47073ff4c9a733.png)

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 22, 2025, 5:05am UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/7 "2025-08-22T05:05:02Z")

</div>

Are you an admin, or higher TL? If yes, then you perhaps would try to use some low TL test user instead.

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [August 22, 2025, 1:25pm UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/8 "2025-08-22T13:25:40Z")

</div>

We skip a post when:

- The author’s trust level is greater than TL1.
- The post belongs to a private message topic.
- The author is a bot.
- The author is staff (moderator/admin).
- The author has already made more than 3 posts in regular (non-PM) topics.
- The post has already been scanned 3 or more times.

If the test is working, I’m confident it has to be because one of the above.

---

<div class="post-metadata">

### Author: ![J-Ha\_Hasegawa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j-ha_hasegawa/32/518294_2.png) [@J-Ha\_Hasegawa](https://meta.discourse.org/u/J-Ha_Hasegawa)
#### Post date: [August 22, 2025, 3:29pm UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/9 "2025-08-22T15:29:46Z")

</div>

Ahhh yes! Thank you for your patient and helpful replies!

I posted with my admin user instead of my trust level 0 user. 🤦‍♀️

It’s working! I love the way the discourse\_ai\_spam user shows up as the user who flagged and unlisted the post.

 ![CleanShot 2025-08-22 at 08.27.35@2x](https://global.discourse-cdn.com/meta/original/4X/e/f/5/ef56081bc9645a0c480b2562865dfbfc70626fbe.png)

Thank you again for your quick and generous help with this!

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [August 22, 2025, 7:12pm UTC](https://meta.discourse.org/t/ai-spam-bot-says-it-is-not-spam-but-scan-log-says-it-is-spam/379375/10 "2025-08-22T19:12:26Z")

</div>


