cd /news/artificial-intelligence/it-s-a-lot-harder-to-beat-pangram-th… · home › topics › artificial-intelligence › article
[ARTICLE · art-164979] src=gauthamsk.substack.com ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

It's a lot harder to beat Pangram than I thought

A developer built an agentic loop on Claude Code that iteratively rewrites AI-generated text to evade Pangram's AI-text detector, using the detector's score as an objective function to hillclimb toward 0% AI. After five initial attempts failed outright, the agent tried a pretrained-only Mistral 7B v0.3 model, where nine of ten runs still scored 100% AI but one reached 85.5%, suggesting post-training mode collapse is what detectors key on.

by read5 min views3 publishedNov 6, 2026
It's a lot harder to beat Pangram than I thought
Image: source

I find it really hard to finish writing my articles these days. It’s mainly due to two reasons: 1) I find it impossible to write without asking AI for feedback, or asking AI to fill in some gaps, and 2) Like most people, I’ve grown allergic to all patterns of AI slop. The load-bearing questions, it isn’t just X — it’s Y, the short phrases, that familiar sentence structure… I could go on. I even wrote about calling AI writing cringe long before the term “slop” gained popularity.

The combination of these reasons meant I now hated my own writing, more than ever. I use AI to brainstorm and save thinking work, then I incur a lot more work to clean up all the uncanny phrases it manages to sneak in.

“Why don’t you just write without AI then?” If you look at the meme above, I’m clearly in the midwit zone. Instead of fighting my position on the bell curve, I decided to embrace it and build something stupid for myself: An agentic loop that turns detectable AI writing into undetectable AI writing.

The ingredients for building this loop are simple. First, we need reliable AI text detection. I used to be extremely skeptical about this technology until last year, but I started fully trusting Pangram recently. It works remarkably well for most use cases. I got their API and started computing pangram_score(text).

Then, we need an objective function for the loop to measure and hillclimb towards. As someone filled with endless ambition/delusion, the goal was clearly going to be 0% AI text. We also need some instructions on how to iterate, and memory that ensures the agent is not repeating its mistakes, and trying new approaches. Putting everything together looks like this:

while(pangram_score(text) >0% AI) {

rewrite_text() //adapting instructions, taking memory into account

}

To run this experiment, I gave Claude (Fable 5.1) the first half of my article and asked it to finish the remaining bits for me. The prompt was “You are a prolific Substack author. Finish this article for me. Avoid Claudisms in your writing as much as possible. Make it short.” Pangram caught everything.

Now, I may be a midwit, but I’m no spendthrift. Before running my stupid loop, I wanted to see if this was even an objective that an LLM could hillclimb towards. Letting it run until goal achievement smelled like a surefire way to burn through my Pangram credits with no good result.

So I built the loop on Claude Code and ran it exactly five times to begin with. I pushed Claude Code to adapt instructions each time, favoring goal achievement over output quality. That meant it could ignore grammatical correctness, ignore spelling errors, and basically do whatever was needed to sound human. The results were annoying.

Claude failed so badly that it started suspecting Pangram’s correctness. It sent an excerpt from Moby Dick to “calibrate” the API. I wish to have this level of confidence some day.

Things now got serious. It wasn’t about masking AI text anymore. It was about Claude Code vs Pangram, with me nudging and nagging from the sidelines. I asked it to research how Pangram worked, then reason about the architecture of LLMs, and finally explain why it was losing badly.

The initial claim pointed to post-training as the root cause. Apparently, Pangram is highly sensitive to the mode collapse that results from post-training, and no amount of stylistic changes would be able to hide the core patterns that scream AI-generated text.

To solve this issue, Claude Code went and downloaded a pretrained-only (base) model (Mistral 7B v0.3) and tried ten more variations. Nine out of ten runs gave 100% AI scores. But one of them gave a score of 85.5% AI! Progress > > > > > Perfection.

I asked to double down on the same approach and get me to 0% AI. I fixed the number of Pangram API calls that could be used. I also allocated about an hour for the agent to thoroughly reason about every approach, research AI detection mechanisms at every appropriate turn, and correct course as needed. Claude Code kept asking me to write and share some original text for reference, which I blatantly refused to do. If we are going to cheat, we better do it properly.

An hour and over a hundred thousand input + reasoning tokens later, I finally got a version that was 0% AI-generated!

Anyone who has worked long hours with Claude Code or Codex knows better than to trust these results at face value. Setting up a solve-at-all-costs objective is exactly the kind of task AI will achieve, while incurring all sorts of ridiculous costs.

I asked Claude Code to explain how it got here. And its response was truly load-bearing! (sorry I couldn’t resist)

A simpler, one-word explanation for what it did = PLAGIARISM. To be fair, it was a pretty spectacular act of plagiarism. Claude specifically found a pre-2022 article that could not have been written using AI. It then spliced portions of that article into the AI generated text that I had posted. It hit the Pangram API with fully plagiarized text and got a score of 0% AI. Then it iteratively reduced the level of plagiarism until the score changed. The final version got a score of 0% AI and 37% plagiarism from Pangram.

So there you have it. The lesson: If you want your writing not to sound like AI, write it yourself. But if you don’t want to write it yourself, go and copy someone else’s writing. Just make sure they didn’t use AI either.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @pangram 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/it-s-a-lot-harder-to…] indexed:0 read:5min 2026-11-06 · —