[BUG] Model ignores configured line width in CLAUDE.md, wraps at ~80 instead of configured limit
Description
When configuring line width rules in CLAUDE.md, the model consistently wraps lines too early (around 75-80 characters) regardless of the configured limit. This affects both code and plaintext output.
The rules are documented in multiple places (global CLAUDE.md, project CLAUDE.md, memory files). The model acknowledges the rules when asked but fails to apply them when generating text.
Affected areas
- Commit messages (100 chars): Bullet points wrap at ~80, leaving 20+ characters unused per line
- Code comments (120 chars): JSDoc and inline comments sometimes break long sentences across 3 lines instead of filling lines up to 120
- Documentation and MD files (120 chars): Same pattern, wrapping well below the limit
The model appears to default to ~80 characters as its internal line width. When sentences happen to have a natural break point (period, comma, clause boundary) around that length, the result looks correct by coincidence. The problem becomes obvious with longer sentences or bullet points where the next natural break is well beyond 80 characters, but the model wraps anyway.
Reproduction
- Add to
~/.claude/CLAUDE.md:
```
- 120 Zeichen: Code, Code-Kommentare, Dokumentation, eigene MD-Dateien
- 100 Zeichen: Commit-Messages und andere Plaintext-Ausgaben
- Jede Zeile so nah ans Limit wie möglich füllen. Erst umbrechen wenn das nächste Wort die Grenze überschreiten würde.
```
- Ask Claude to write code with doc comments, or draft a commit message with bullet points
- Observe that lines frequently break around 75-80 characters
Expected behaviour
Lines should be filled up to (but not exceeding) the configured limit (100 or 120), breaking only when the next whole word would cross the boundary.
Actual behaviour
Lines wrap at ~75-80 characters in the majority of cases. Repeated corrections within the same session sometimes help temporarily but don't persist across context compactions or new sessions.
Additional observation
When corrected about the line width, the model struggles to improve. Instead of simply counting characters and filling lines to the limit, it starts overthinking the problem, sometimes spending over 2 minutes of "thinking" time on something as trivial as reflowing a few lines of text. The result after that extended thinking is often still wrong.
Environment
- Claude Code CLI on macOS
- Model: claude-opus-4-6
- Observed across multiple sessions and context compactions
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗