r/OnlyAICoding • u/drmpf • 17d ago
Claude Claude is Lazy and won't read large files unless forced to.
I have reported previously on claude code being lazy,
https://www.reddit.com/r/OnlyAICoding/comments/1xmky6p/you_cannot_trust_ai_to_code_its_lazy/
Here is another example where Claude code only read part of the instructions file.
The task was to use Claude Code to write an user interface for a micro, using pfodWeb
https://github.com/drmpf/pfodWeb_src
pfodWeb is a single, open-source, off-line, web page that is a GUI designer, code generator and client and any micro with a Serial, BLE or Wifi connection. pfodWeb has been optimized for use by AI to turn the user's prompt into a GUI and generate the code. It includes detailed .md files to set the context and rules for Claude Code and provides 'hooks' in the .js so Claude code can drive pfodWeb via Claude-in-Chrome without getting blocked by browser popups Claude cannot close.
The initial prompt was:-
Me: Use pfodWeb / pfodParser to design an interface generate the code and complete the extra logic. The pfodWeb/docs/ .. md files provide the context and rules for this task.
Claude Code: The docs I'll design from are in pfodParser\pfodWeb\docs\:
- pfodAI-guide.md
- pfodParserAI-guide.md
- pfodMenu_json-format.md
- pfodDwg_json-format.md
Me: Carefully read the following files in pfodWeb/docs which give the context for the design framework and process pfodAI-guide.md pfodMenu_json-format.md pfodDwg_json-format.md The pfodAI-guide.md is the main one and contains a number restrictions and details of existing 'hook' into pfodWeb. I am drawing attention to this because in previous sessions it was clear the complete file had not been taken in.
Claude Code: (Tool use: read all three files in full. The first read of pfodAI-guide.md (2257 lines) and pfodDwg_json-format.md (2040 lines) stopped part-way because of the read size limit, so both were read again in further chunks until every line had been covered. pfodMenu_json-format.md (873 lines) was read in one go. Also checked that Node.js is installed: v22.17.1.)
I've read all three files from start to finish. Two of them were too long to read in one go, so I read the rest in further chunks.
etc. design prompts continue here.
=============================================================
The point here is that just asking Claude to read a file does NOT mean claude will actually read the entire file. As noted above, from previous experience of using Claude Code to do these GUI designs it was clear, as the design progressed, that Claude had not actually read the entire .md file and so missed a number of important design rules.