claude-code - 💡(How to fix) Fix Error message word-wrap breaks mid-word in terminal output

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

⏺ Bash(sleep 25 && grep -E "ready|Local:|error when|Electron.*started|App ready" /private/tmp/claude-501/-Users-jbbrown-code-github-jb-brown-Prosponsive--claude-worktr…) ⎿ Error: Blocked: sleep 25 followed by: grep -E "ready|Local:|error when|Electron.*started|App ready" /private/tmp/claude-501/-Users-jbbrown-code-g ithub-jb-brown-Prosponsive--claude-worktrees-fix-commerce-gate-bypass/2d0618b6-fee8-48cd-bf32-de7af36adbbc/tasks/bkpa540qh.output head -10. To wait for a condition, use Monitor with an until-loop (e.g. until <check>; do sleep 2; done). To wait for a command you started, use run_in_background: true. Do not chain shorter sleeps to work around this block.

Code Example

Bash(sleep 25 && grep -E "ready|Local:|error when|Electron.*started|App ready"
      /private/tmp/claude-501/-Users-jbbrown-code-github-jb-brown-Prosponsive--claude-worktr…)
Error: Blocked: sleep 25 followed by: grep -E "ready|Local:|error when|Electron.*started|App ready" /private/tmp/claude-501/-Users-jbbrown-code-g
     ithub-jb-brown-Prosponsive--claude-worktrees-fix-commerce-gate-bypass/2d0618b6-fee8-48cd-bf32-de7af36adbbc/tasks/bkpa540qh.output head -10. To
     wait for a condition, use Monitor with an until-loop (e.g. `until <check>; do sleep 2; done`). To wait for a command you started, use
     run_in_background: true. Do not chain shorter sleeps to work around this block.
RAW_BUFFERClick to expand / collapse

Long error messages that contain long paths or URLs appear to wrap mid-word, splitting tokens across lines in a way that is hard to scan.

Example observed today

⏺ Bash(sleep 25 && grep -E "ready|Local:|error when|Electron.*started|App ready"
      /private/tmp/claude-501/-Users-jbbrown-code-github-jb-brown-Prosponsive--claude-worktr…)
  ⎿  Error: Blocked: sleep 25 followed by: grep -E "ready|Local:|error when|Electron.*started|App ready" /private/tmp/claude-501/-Users-jbbrown-code-g
     ithub-jb-brown-Prosponsive--claude-worktrees-fix-commerce-gate-bypass/2d0618b6-fee8-48cd-bf32-de7af36adbbc/tasks/bkpa540qh.output head -10. To
     wait for a condition, use Monitor with an until-loop (e.g. `until <check>; do sleep 2; done`). To wait for a command you started, use
     run_in_background: true. Do not chain shorter sleeps to work around this block.

Notice github split as -g / ithub- at the wrap point. The error text is readable, but a path token broken mid-word looks like a different string and breaks scanability.

Expected

Wrap at word boundaries (whitespace, or on path separators like /, -, _) rather than inside an identifier.

Impact

Minor, but affects every long error/path rendered in the transcript. More pronounced on narrower terminals.

Environment

  • Claude Code CLI (terminal rendering)
  • macOS / zsh

Suggestion

Use a word-aware wrap (e.g. break only on whitespace, and if a token exceeds the terminal width, insert a zero-width break or explicit soft hyphen rather than a hard mid-character break).

extent analysis

TL;DR

Implement word-aware wrapping in the error message rendering to prevent mid-word breaks.

Guidance

  • Identify the current text wrapping mechanism used in the Claude Code CLI and assess if it can be modified to handle word boundaries.
  • Consider using a library or function that supports word-aware wrapping, such as inserting zero-width breaks or explicit soft hyphens for long tokens.
  • Test the wrapping behavior with various terminal widths to ensure the solution works as expected in different environments.
  • Review the error message formatting to determine if any existing formatting options can be leveraged to improve readability.

Example

No code snippet is provided as the issue does not specify the exact implementation details of the Claude Code CLI.

Notes

The solution may require modifications to the underlying text rendering engine or the introduction of a new library, which could have implications for compatibility and performance.

Recommendation

Apply a workaround by implementing word-aware wrapping, as it is a minor issue that affects readability but does not seem to have a direct fix available in the current version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Error message word-wrap breaks mid-word in terminal output