Skip to content

TUI crashes when rendering long audio file paths in chat history #4818

@jnk15de

Description

@jnk15de

Summary

The TUI crashes with "Rendered line exceeds terminal width" when displaying chat messages containing audio attachments with long UUID-based filenames.

Environment

  • OpenClaw Version: 2026.1.29 (a5b4d22)
  • Platform: Linux Ubuntu (Docker container)
  • Terminal Width: 220+ characters (tested multiple widths)
  • Feature: Audio transcription enabled (Whisper CLI)

Steps to Reproduce

  1. Enable audio transcription in config:
    "tools": {
      "media": {
        "audio": {
          "enabled": true,
          "models": [{"type": "cli", "command": "whisper", "args": ["--model", "base", "--output_format", "txt", "{{Media}}"]}]
        }
      }
    }
  2. Send voice messages via Telegram (generates long paths like /home/user/.openclaw/media/inbound/file_6---1c8d3cc5-a4bb-423a-8c7b-6327d7783bf7.ogg)
  3. Try to open TUI with openclaw tui --password <password>
  4. TUI crashes immediately during render

Expected Behavior

  • TUI should truncate or wrap long file paths
  • Audio messages should display cleanly in TUI

Actual Behavior

Error: Rendered line 366 exceeds terminal width (244 > 220)
TUI.doRender crashes

The crash log shows the problematic path:

/home/moltbot/.openclaw/media/inbound/file_6---1c8d3cc5-a4bb-423a-8c7b-6327d7783bf7.ogg

Regression

  • TUI worked perfectly before enabling audio transcription
  • Issue started immediately after first voice message
  • Web UI works fine with same content

Workaround

  • Use Web UI instead of TUI
  • Or start new session without audio history

Suggested Fix

Add proper path truncation/ellipsis for long file paths in TUI audio message display.


Bug report generated with help from my OpenClaw instance 🦞

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions