
Software used to have one kind of user, a person. Now a second kind is showing up: an AI helper that uses the software for that person. When the helper makes the same mistake again and again, most teams reach for the same fix. They write a firmer instruction.
Shopify tried that and wrote down how it went. I read it and then found the same habit in my own code.
The short version
- Shopify, which builds online stores, lets AI shopping helpers use tools on those stores. One tool added an item to the cart. Some helpers called it twice, so shoppers got two. Written warnings didn't stop it. Changing the tool did.
- The helper now sends the whole cart, so sending it twice does nothing.
- I have the same flaw in a script of my own, guarded only by a warning.
- When a helper repeats a mistake, change the tool before you rewrite the note.
What Shopify found
Yoav Weiss is an engineer at Shopify. On December 1, 2026 he published "Shipping WebMCP tools in storefronts and Checkout" on the company's engineering blog. I read it in full.
WebMCP is a way for a web page to offer tools to an AI helper. The page says what each tool does and what it needs. The helper calls the tool directly, where before it had to click through the page like a person.
Shopify put these tools on its stores in August and on its checkout in September. In its own test of checkout, the tools ran 2.7 times as fast as a helper clicking through the page. They cost 58% less. And they finished 60 of 60 tries, against 56 of 60.
Then came the odd bug. Some of the simpler helpers called the add-to-cart tool more than once. They wanted to be sure. The tool's description told them not to. The tool's reply told them it had worked. They did it anyway, and in testing the product landed in the cart more than once.
Weiss says the team went through many versions of the wording. In his words, they told, begged, and shouted.
What worked was a different tool. The new one doesn't add an item. It takes the full cart as the helper wants it, and it gives back the cart as it now stands. If the helper sends the same cart twice, the second call changes nothing.
His line on it is the one I'd pin up. The tool's shape steered the helper far more reliably than its description.
Why I'd go past Nielsen here
Jakob Nielsen has studied how people use software for decades. On December 2 he published "50 Tough Lessons for UX." Lesson 46 says your next user may be an AI agent.
He reports that by the middle of 2026, agents made up nearly 40% of the visits to the help pages of Stripe, a payments company. His advice is to give agents honest content, clean structure, and complete facts where a machine can read them.
That's right for a helper that reads. Shopify's story is about a helper that acts, and there clear words weren't enough. The wording was clear. The helper still called twice.
So I'd add one line to his lesson. For an agent that acts, design the tool so the wrong move is harmless.
(Basia Kubicka, who builds AI systems for small companies, posted a version of this last week. Her first content agent had instructions marked mandatory, and its checks still didn't always run. She moved every check that could be code out of the prompt.)
My own script runs on a warning
I have a small script that schedules my posts in a tool called Typefully. If you run it twice for the same post, it schedules the post twice. Nothing in the code looks for a draft that's already there.
I knew that when I wrote it. So I wrote a warning at the top: always check the list first.
Then an AI agent started running the script on a schedule. So the warning went into the agent's instructions too. And then into the stored task that starts each run.
3 warnings, 0 fixes.
3 warnings, 0 fixes
It has held so far. Yesterday's run made four drafts, and the list showed four. But it holds because a reader obeyed, every time. Shopify's helpers were also told.
The same script has a part I got right, mostly by luck. Uploading a cover image fails now and then, so the script retries. That retry is safe. The draft is only made after the upload works, so trying again can't make two drafts. Nobody has to remember a rule.
One file, two kinds of safety. One is in the order of the steps. The other is in a note.
The rewrite
The old rule: when the agent gets it wrong, write a clearer instruction.
The new rule: when the agent gets it wrong twice, change the tool so the mistake does nothing.
A few ways to do that, from Shopify's post and my own file:
- Have the tool take the end state ("the cart should hold these items"), not a step ("add one").
- Have it give back the full state, so the helper can see the job is done.
- Have it look before it creates. My script should ask "is there a draft for this post on this day?" first.
I haven't made that change yet. This post is the note to myself, which I know is ironic.
For the bigger picture of what agents ask of a business, see Personal Agents Will Call Every Few Hours. Kill the Front Door. For checks that leave proof, see The Receipt Gate. In my design handbook, the closest chapter is Specifying Behavior.
What this doesn't prove
Shopify's numbers come from its own test, and the post doesn't say how often the double add happened. My example is one script. I didn't run it twice to watch it fail. I read the code.
And some rules can't be built into a tool. Tone is one. Those still need words and a check.
This week
Open the instructions your AI agent reads. Search for the words always and never. Pick one. Ask whether the tool could make it true without anyone reading the note.
This is one more case for the argument on Enterprise AI Agents: an agent is only as safe as the tools you hand it.
Related answer: How do you stop an AI agent from doing the same thing twice?
Sources: Yoav Weiss, "Shipping WebMCP tools in storefronts and Checkout," Shopify Engineering, December 1, 2026, read in full. Jakob Nielsen, "50 Tough Lessons for UX," December 2, 2026, lesson 46 read in full; the Stripe figure is as he reports it. Basia Kubicka's LinkedIn post on her content agent, read on LinkedIn on December 2, 2026. My script is scripts/schedule-post-typefully.mjs in this site's code, read on December 2, 2026.
Frequently asked
What went wrong with Shopify's add-to-cart tool?+
As Yoav Weiss of Shopify reports it, some simpler AI helpers called the tool more than once to be sure the item was added. In testing, the product landed in the cart more than once.
How did Shopify fix it?+
It stopped relying on the tool's written description. The new tools take the full cart as it should look and return the new cart. A second call changes nothing.
What does it mean that shape beats description?+
The shape is what a tool takes in and gives back. Weiss writes that the shape steered AI helpers far more reliably than the words that describe the tool.
What is the flaw in my own script?+
My post scheduling script creates a second draft if it runs twice for the same post. The guard is a written warning to check the list first. It appears in 3 places and the code is unchanged.
What should a team do this week?+
Search the instructions your AI agent reads for the words always and never. Pick one rule and ask whether the tool could make it true by itself.


Sign in with LinkedIn to leave a comment.
Sign in with LinkedIn