Prevent cognitive debt by manually retyping LLM-generated code
TL;DR Highlight
Blocking agent file edits and retyping code by hand improved one dev's understanding, at about 2x speed.
Who Should Read
A solo developer uneasy because code from coding assistants has left them not knowing what lives where in their own project
Core Mechanics
- Make the agent show edits only in chat
- The agents file forbids creating, editing, moving, renaming or deleting files unless asked.
- Proposed edits appear in chat and the author types them in.
- Run state-changing commands yourself
- Commands that install dependencies or change repo state are shown in chat instead.
- The author runs them manually.
- About 2x faster, not 10x
- The author says this is faster than using no LLM.
- It is slower than letting the machine do everything.
- Typing surfaces hallucinations and bad design
- Slowing down makes errors more likely to be noticed.
- The author also refactors and comments while typing.
- You get a spatial map of the codebase
- The author knows where each piece of functionality lives.
Community Reactions
- Where are the efficiency gains?
- One commenter asked why not drop the LLM if you think, read, retype and fix anyway.
- Another said retyping to understand makes you a code monkey.
- Only self-written code builds the skill
- One commenter said retyping is a no, but typing your own code is a yes.
- They described learning Ruby and Go by retyping others' example solutions.
- Experience retyping code
- One commenter retyped an inherited codebase and fixed many bugs while becoming an expert quickly.
- Another used this approach, then stopped and blogged about it.
- Rethink the understanding level
- One commenter reviews AI code like a teammate's and accepts, edits or requests revisions.
- Another suggested managing LLMs as agents, like a manager who doesn't know every line.
How to Apply
- Add the no-edit rules to your agents file
- Today, paste the author's three instructions into AGENTS.md or CLAUDE.md in a personal project.
- Ask for one small feature and type the code from chat yourself.
- Ask about unfamiliar APIs while typing
- Stop when an API or algorithm is unclear and ask the LLM to explain it.
- Rename and restructure to your taste as you type.
- Scope where you use this
- Use it for personal projects or core modules you must understand.
- Keep your normal review flow for simple parts and compare the speed cost.
Try It
# Paste into AGENTS.md / CLAUDE.md for Claude Code etc. (the author's instructions)
I want to understand every line of code that goes into this project. Never create, edit, move, rename, or delete project files unless I explicitly ask you to do so. Instead, show me every proposed edit in the chat so I can type it in manually.
Do not run commands that modify project files, install dependencies, or change repository state unless I explicitly request that action. Instead, show me those commands in the chat so I can run them manually.
I'm an experienced developer. Do not explain syntax, APIs, programming concepts, or implementation details unless explicitly asked.
# Next: ask "Show me the code to add {{feature}}" and type it in yourselfTerminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.
Related Resources
- https://ankursethi.com/blog/prevent-cognitive-debt-by-manually-retyping-llm-generated-code/
- https://arxiv.org/pdf/2509.21972v1
- http://rubyquiz.com/
- https://quii.gitbook.io/learn-go-with-tests
- https://kamens.com/blog/code-with-ai-the-hard-way
- https://kamens.com/blog/code-with-ai-the-hard-way-update
- https://kamens.com/blog/code-with-ai-the-hard-way-update-ii
- https://smalldocs.org
- https://github.com/espressoplease/smalldocs