Bash tool should support terminal inline images (iTerm2/Sixel/wezterm imgcat)

Resolved 💬 3 comments Opened Apr 14, 2026 by vimalk78 Closed Apr 17, 2026

Problem

Claude Code's Bash tool runs commands in a subprocess whose stdout is captured, not piped to the user's terminal. This means terminal escape-sequence-based features like inline images (wezterm imgcat, iTerm2 image protocol, Sixel graphics) don't work.

Use case

Rendering LaTeX math equations as inline images in the terminal. A script (teximg) can render LaTeX to a PNG via matplotlib and display it inline using wezterm imgcat. This works when the user runs it directly in their terminal, but fails when Claude runs it via the Bash tool because the image escape sequences never reach the terminal.

$ teximg '$\text{Attention}(Q, K, V) = \text{softmax}\left(\frac{QK^T}{\sqrt{d_k}}\right)V$'
# Works in terminal, fails in Bash tool: "No such device or address (os error 6)"

This would also enable other image-in-terminal use cases: charts, diagrams, plots, etc.

Possible approaches

  • Pass through iTerm2/Sixel escape sequences from Bash tool output to the host terminal
  • Detect image escape sequences in Bash output and render them in Claude Code's UI
  • Provide a dedicated tool for displaying images inline

Environment

  • Terminal: WezTerm (supports iTerm2 image protocol)
  • OS: Fedora 43, Wayland

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗