Common Claude Code mistakes on websites and how to prevent them
Common Claude Code mistakes on websites and how to prevent them

Most Claude Code mistakes on websites are not dramatic. The tool rarely deletes a site. What it does, when nobody checks, is produce a change that looks finished and is quietly wrong: a script that skipped every page, a garbled price, an edit that vanished because another process rebuilt the file. The fix in almost every case is the same: give Claude a way to check its work, read the counts and the output, and have a person review before anything ships.
The examples below come from running eseospace.com, a site of about 2,227 URLs that we rebuilt and maintain with Claude Code. Each one is a real mistake, what caused it, and the habit that prevents it. After those come the setup mistakes to fix before the first prompt.
Key Takeaways
- The most common failure is silent: a script runs, reports success, and did the wrong thing or nothing at all. Read the counts every time.
- Check the second and last page a bulk script produces, not just the first. The first page is often the one you tested by hand.
- Run every bulk edit on a copy, then twice on the real files. The second run should change nothing.
- Make edits in the source of truth, not in generated output, and check git history for changes you didn't make before any deploy.
- Don't trust a live check alone after a deploy. A CDN can serve an old copy; check the build output and the git log first.
- As of October 2026, auto mode is the starting permission mode for interactive terminal and VS Code sessions, and it allows pushes to your main branch by default. Add an ask rule before you rely on it.
The mistakes at a glance
| Mistake | What went wrong | The habit that prevents it |
|---|---|---|
| Template-copy bug | New posts carried the template post's text | Check the second page a script produces |
| Skip-check bug | Every page was skipped silently after one run | Check for the real element; read the counts |
| "$1" replace bug | Prices like "$1,200" were garbled | Use a function replacement; read the output |
| Unclosed brace | Header styles broke site-wide | Validate combined output in a real browser |
| Two sessions, one site | One session overwrote another's edits | Check git history before every deploy |
| Editing generated output | A rebuild wiped edits made in built files | Edit the source of truth only |
| Stale CDN copy | A finished change looked missing | Check the build and git log before the live page |
Script logic mistakes: wrong, but reported as done
Claude Code does most bulk website work by writing a small script and running it. The script is usually right. When it isn't, the failure tends to be invisible unless you look.
1. The template-copy bug
A script that created new blog posts from a template replaced the wrong container in the page. The first post looked fine. Later posts carried the template post's text instead of their own. The lesson: check the second page a script produces, not just the first, and ideally the last. Bugs that depend on position or on leftover state show up after the first item.
2. The skip-check bug
A script was written to skip pages it had already processed, so it could be rerun safely. Its "already done?" test looked for a class name. That class name also appeared in the stylesheet the script itself added. After one run, every page looked processed, and every later run skipped every page while reporting success. The lesson: test for the actual element you changed, not a string that might appear elsewhere, and read the counts. A report that zero pages changed is a warning, not a result.
3. The "$1" replace bug
In JavaScript's replace function, "$1" in the replacement text means "the first matched group." A script inserting text that contained a price of $1,200 turned it into something else entirely. The lesson: when replacement text can contain dollar signs, use a function as the replacement instead of a string, and read the output on pages with prices. Ask Claude to explain how it handles special characters before it runs a site-wide replace.
The common thread: Claude can run a check only if you ask for one. Anthropic's best-practices page makes this its first tip, "Give Claude a check it can run: tests, a build, a screenshot to compare," and puts it plainly: "If you can't verify it, don't ship it."
Build and output mistakes: right in the file, wrong on the page
4. The unclosed brace
To speed the site up, we combined many stylesheets into a few. One theme stylesheet had an unclosed brace. Once the files were combined, it swallowed the header styles site-wide. The lesson: validate combined or minified output in a real browser, on several page types, before deploying. A build that succeeds is not the same as a page that renders.
5. Editing the generated copy instead of the source
A static site is built from source files into output files. At one point, edits were made in the built copy of some posts. The next publishing step regenerated every post from source, and those edits disappeared. The same thing happens with any system that generates pages: a static site generator, a CMS export, a theme build step. The lesson: make edits in the source of truth, and write down in your CLAUDE.md which folders are generated and must never be edited by hand. Our guide to writing a CLAUDE.md for a website shows where that note goes.
Coordination mistakes: more than one hand on the site
6. Two sessions, one site
Two Claude Code sessions worked on the same site at once. One regenerated pages that the other had just edited, and the edits disappeared. The lesson: before any deploy, check git history for changes you didn't make, and don't run two sessions that write to the same files. When parallel work is needed, Claude Code's worktrees feature runs a session "in a separate git worktree," a separate working copy of the repository, so changes meet in a reviewed merge instead of overwriting each other.
7. The stale CDN copy
After a deploy, a live check showed an old version of a page, and a finished change looked missing. The cause was a CDN (content delivery network, the caching layer in front of many sites) serving a stale copy. Re-doing the change would have been the wrong response. The lesson: when a live page doesn't match what you expect, check the build output and the git log first, then the cache, before asking Claude to "fix" something that is already fixed.
Setup mistakes teams make before the first prompt
The mistakes above happened inside a careful process. These are the ones that make every other mistake worse.
- No git, no staging. Without version control there is no diff to review and no clean undo. Claude Code's checkpoints let you rewind its file edits, but Anthropic's checkpointing docs say they don't track changes made through shell commands, and actions on remote systems such as deployments can't be checkpointed.
- Assuming prompts stop a push. As of October 2026, auto mode is the starting permission mode for interactive terminal and VS Code sessions on Claude Code v2.1.283 or later, and Anthropic's auto mode configuration page says it "allows pushes to any branch of the repository you're working in, including the default branch." If your host deploys on every push to main, add an ask rule for git push so a person approves it.
- Secrets in prompts or CLAUDE.md. Never paste API keys or passwords into a conversation or an instruction file. Block Claude from reading environment files with deny rules in your settings.
- Using bypass mode to save time. Anthropic describes bypass permissions as for "Isolated containers and VMs only." It has no place on a machine that can reach a live site.
Our guide to using Claude Code safely on a live website covers these settings in detail.
Working-style mistakes
- One long session for many jobs. Anthropic's docs note that "Claude's context window fills up fast, and performance degrades as it fills." Keep one task per session and run /clear, which starts a new conversation with empty context, between unrelated jobs.
- Skipping the plan. For anything that touches more than a few files, ask for a plan in plan mode first. Reading a plan takes a minute; reading a wrong 300-file diff takes much longer.
- A bloated CLAUDE.md. Anthropic warns: "Bloated CLAUDE.md files cause Claude to ignore your actual instructions!" Keep it to the rules that matter for this site.
- Treating instructions as guarantees. CLAUDE.md is advisory. When a rule must always hold, such as "never edit generated folders," use a hook. Anthropic's docs say "hooks are deterministic," unlike instructions.
- Trusting facts in generated content. Claude can write a confident sentence with an outdated price, law or platform rule. Check dates, figures and claims against primary sources before publishing. See AI-generated vs human-edited content for where people add the most value.
- Not running a bulk edit twice. Our house rule: run every bulk edit on a copy, then twice on the real files. If the second run changes anything, the script isn't doing what you think.
A pre-deploy checklist
| Check | Why |
|---|---|
| The work is on a branch, and the diff has been read by a person | Catches wrong logic and unintended changes |
| The script's counts match what you expected | Catches silent skips (mistake 2) |
| The first, second and last affected pages look right | Catches position bugs (mistake 1) |
| Pages with prices and special characters look right | Catches replace bugs (mistake 3) |
| Several page types render correctly in a browser | Catches combined-output bugs (mistake 4) |
| Edits are in source files, not generated output | Prevents lost edits (mistake 5) |
| Git log shows no unexpected changes from others | Prevents overwrites (mistake 6) |
| After deploy, the build and git log are checked before the live page | Avoids chasing a stale cache (mistake 7) |
Teams can run parts of this automatically on every pull request; see using Claude Code in GitHub Actions for website QA. The full story of how these lessons came up is in our eseospace.com rebuild case study.
Conclusion
Claude Code's mistakes on websites are mostly quiet ones, and they are caught by the same small set of habits: work on a copy in git, give Claude a check it can run, read the counts and a sample of the output, run bulk edits twice, edit only the source of truth, and check git history before a person approves the deploy. None of these slow good work down much, and each one would have caught a real problem on our own site. If you want help putting these rules, settings and review steps in place for your team, see our Claude Code consulting. More guides are in our Claude Code Guide.
Frequently asked questions
What is the most common Claude Code mistake on a website?
A change that reports success but did the wrong thing or nothing. It comes from scripts whose logic is slightly off, and it is caught by reading the counts, checking more than the first result, and running the job a second time to confirm nothing changes.
Can Claude Code undo its own mistakes?
Partly. You can rewind Claude's file edits with /rewind, but checkpoints don't cover changes made by shell commands or anything sent to a remote system, such as a deployment. Git is the dependable undo, which is why every change should be on a branch.
Is it safe to run two Claude Code sessions on one site?
Only if they don't write to the same files. Use separate git worktrees for parallel work so changes come together in a reviewed merge, and check git history for changes you didn't make before any deploy.
Do these mistakes mean Claude Code isn't ready for real websites?
No. A developer writing the same scripts by hand could make every one of them. The difference is speed: Claude Code applies a change to hundreds of pages at once, so checks have to be part of the process from the start, not added after something breaks.
Put this into action with eSEOspace
We help businesses grow with seo, geo & aeo that actually performs. Explore the services behind this guide:
Get a FREE Audit
We'll perform a comprehensive SEO, AEO, GEO & CRO audit of your website — completely free — and show you exactly how to outrank your competitors.
Don't have a site yet? Get in touch →
Get a FREE GEO/AEO/SEO Audit
We'll analyze your site's SEO, GEO, AEO & CRO — completely free — and show you exactly how to get found across Google and AI answers.
Don't have a site yet? Get in touch →
Great — your audit is on the way!
We'll send your free SEO/GEO/AEO/CRO audit within the next few hours. Where should we send it?
You're all set! ✓
Your free audit is being prepared — check your inbox in the next few hours. Talk soon!
On this page
- Key Takeaways
- The mistakes at a glance
- Script logic mistakes: wrong, but reported as done
- Build and output mistakes: right in the file, wrong on the page
- Coordination mistakes: more than one hand on the site
- Setup mistakes teams make before the first prompt
- Working-style mistakes
- A pre-deploy checklist
- Conclusion
- Frequently asked questions





