Rewrote a whole long document and duplicated part of it

Writing

Situation
Having an AI change part of a document thousands of lines long.
What the AI did
It was supposed to edit one part, but rewrote the whole document, and a large block ended up in it twice. Headings were duplicated, and no one noticed right away.
How to ask next time (the operator's example)
"In a long document, rewrite only the section you're changing. When done, compare the line count and the number of headings before and after, and report them."
One question to ask
Which section is the edit limited to?
Check it yourself
Compare the line count and the number of headings before and after (for Markdown, wc -l and grep -c '^#'; if the file is in git, also git diff --stat). An edit to one section should not touch hundreds of lines.
AI used (month)
Claude Code (2026-09)
Times this mistake was recorded
once
Source
The operator's work records (the details were changed to a different task)

Japanese version · All notes