[BUG] Claude code - block diagram creation repeat problems
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bug Report: ASCII Diagram Alignment - Overcomplicated Simple Visual Task
Issue Summary
Claude Code severely overcomplicated a simple ASCII diagram vertical alignment task, using excessive scripting and analysis instead of directly fixing obvious visual misalignment.
Expected Behavior
When asked to fix vertical line alignment in an ASCII/Unicode box diagram:
- Look at the diagram visually
- Identify where vertical lines (│) don't align
- Adjust spacing directly to fix alignment
- Should be completed in 1-2 attempts (as noted: "an 8 year old child could do this without all the faff")
Actual Behavior
Claude Code:
- Created multiple Python scripts to analyze character positions
- Built verification checks for line lengths, connector positions
- Rebuilt entire diagrams programmatically
- Ran numerous validation scripts checking positions like [8, 24, 40, 56]
- Took 10+ iterations with excessive analysis
- Still failed to properly fix the alignment
Task Description
User reported: "in some of those diagrams the vertical lines do not align properly"
The diagram was a simple ASCII art architecture diagram (~70 lines) with nested boxes. The Gateway Service inner box had visible misalignment where vertical lines (│) shifted positions between lines.
Key Quotes from User
- "an 8 year old child could do this without all the faff"
- "it's still not correct, but life is too short to get you to correct it"
- "come on - this is not that difficult"
- "I bet $100 you can't fix it"
What Went Wrong
Instead of treating this as a visual alignment problem, Claude Code:
- Over-analyzed with scripts checking exact character positions
- Created functions like
pad_to_74()andbuild_line() - Generated verification output like "✓ All 70 lines are exactly 74 characters!"
- Built diagrams programmatically instead of visually editing
- Failed to see the simple issue: some lines had different spacing
What Should Have Happened
- Read the diagram
- Visually identify misaligned vertical lines
- Use Edit tool to adjust spacing directly
- Done in 1-2 attempts
Technical Details
- File: HIGH-LEVEL-DESIGN.md
- Lines: 30-99 (main architecture diagram)
- Issue: Gateway Service box (lines 45-55) had inconsistent right-edge alignment
- Box-drawing characters: ┌─┐└─┘│┬┴┼
Impact
- Wasted significant user time (15+ minutes of back-and-forth)
- User frustration and loss of confidence in the tool
- Simple task became major time sink
Reproduction
Ask Claude Code to fix vertical alignment in ASCII box diagrams and observe the overcomplicated approach with excessive scripting.
Suggested Fix
Claude Code should:
- Recognize visual/formatting tasks as distinct from algorithmic problems
- Avoid over-engineering simple spacing/alignment fixes
- Use direct editing for visual problems rather than programmatic rebuilding
- Limit verification scripts for straightforward visual tasks
Environment
- Model: Sonnet 4.5 (claude-sonnet-4-5-20250929)
- Date: 2026-01-06
- Platform: darwin
---
User Comment: "you should file a bug report on this so your makers can fix it"
What Should Happen?
Claude should be able to create simple block diagrams for documentation purposes, it attempts to do this but is unable to generate the correct alignment for boxes and connecting lines e.g
create me a simple block diagram of an IoT device
produces the following (file attached below)
Error Messages/Logs
See below for example
Steps to Reproduce
Enter the command - to claude code
create an IoT device hardware and software architecture diagram
iot-device-hw-sw-architecture.txt
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.26
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
<img width="975" height="375" alt="Image" src="https://github.com/user-attachments/assets/82aadb55-5387-4622-9405-290cac4d747f" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗