[MODEL] using heredoc consistently incorrectly
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude ignored my instructions or configuration
What You Asked Claude to Do
Not use heredoc
What Claude Actually Did
Heredoc quoting broke on that content. Writing the generator to a file instead.
Expected Behavior
Not use heredoc
Files Affected
Repository files
Permission Mode
Accept Edits was OFF (manual approval required)
Can You Reproduce This?
Sometimes (intermittent)
Steps to Reproduce
Give Claude, Opus 5 or Fable 5, a task that requires to retroactively fix prose that needs to be detailed instead of systematic. After creating the file with systematic prose, when it goes back to edit the file to change the prose to detailed and reasoned, it will waste effort to attempt to do the edit with heredoc even if instructions are given to not use heredoc. Behavior is intermittent, I suspect related to context window. Regardless, models need to be better trained on better methods to cleanly edit documents on complex projects.
Claude Model
Opus
Relevant Conversation
I need a new MD file next to LEGACY_STRINGS.md that lists each legacy code on its own line, below it I need you to write the path and filename to the related files, under each file fully explain the usage in a way I can understand, then line break a line gap, then do the next code and repeat. I will then manually go through it and next to each legacy code type a replacement leaf or word. Be very thorough. Do not use heredoc.
Impact
Low - Minor inconvenience
Claude Code Version
2.1.228
Platform
Anthropic API
Additional Context
Efficiency is important, although maybe a minor inconvenience, these add up quickly to create an environment that wastes time in situations where good codebase production is important. Claude typically writes code not to YAGNI or good practice principles (eg the public anguish over slop code) and balloons complex codebases out of control without harnessing capability that is NOT native to Claude Code. Endemic of the problem is these massive JSONL files, IMO you should be using SQLite3 to register EACH user reply in it's own row related to a conversation, and structure the data for precise retrieval. This is basic data management and Claude Code's design completely fails at doing intelligent data management for its own session data. Using a proper database per project with good structuring needs to happen like last year. This is why I have had to make my own CLI to further harness how Claude Code operates within my projects. Even with my own CLI based additional harnessing, there is so many edge cases to address and I'm only one human. You have a team of developers and models that can easily refactor the data management side of Claude Code to perform substantially better for both the customers and the models. Please stop dragging your feet and improve Claude Code.