[BUG] Crash when rendering output via SSH on mobile terminal (Termius Android)

Resolved 💬 3 comments Opened Dec 18, 2025 by jsawilowsky Closed Dec 21, 2025

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?

Description:
Claude Code crashes repeatedly when rendering certain outputs. The crash occurs with both Sonnet and Opus models. Error appears to be in
the syntax highlighting/rendering code.

Environment:

  • Client: Termius app on Android
  • Connection: SSH
  • Models tested: Both Sonnet 4.5 and Opus 4.5
  • Crash count: 4 times in same session

Error:
ERROR undefined is not a constructor (evaluating 'new U($,A)')
/$bunfs/root/claude:1147:5029
Full stack trace:
/$bunfs/root/claude:1147:5029

  • <anonymous> (/$bunfs/root/claude:1147:5029)
  • useMemo (/$bunfs/root/claude:170:102665)
  • <anonymous> (/$bunfs/root/claude:45:7784)
  • <anonymous> (/$bunfs/root/claude:1147:4975)
  • gU (/$bunfs/root/claude:170:20697)
  • mU (/$bunfs/root/claude:170:39069)
  • OH (/$bunfs/root/claude:170:36452)
  • ZH (/$bunfs/root/claude:170:35987)
  • GHH (/$bunfs/root/claude:170:52051)
  • w5 (/$bunfs/root/claude:170:85872)

The error references code around Chalk (terminal color library) and syntax highlighting modules.

Steps to Reproduce:

  1. Connect to server via SSH using Termius on Android
  2. Start Claude Code session
  3. Work through plan mode with multi-step project
  4. Crash occurs when rendering complex outputs (code blocks, plans, or formatted results)

Expected Behavior:
Output should render correctly regardless of terminal emulator

Actual Behavior:
Crashes with "undefined is not a constructor" error
Possible Cause:
May be related to terminal compatibility. Mobile SSH clients like Termius may have different:

  • TERM environment variable settings
  • Color/formatting capabilities
  • Character encoding
  • Screen width handling

The crash is in rendering code that handles syntax highlighting and terminal formatting, which are sensitive to terminal capabilities.

Suggested Fix:
Add graceful fallback for terminals with limited capabilities or better detection of terminal features before attempting complex
rendering.
Additional Context:
This may not affect desktop SSH clients or native terminals. Would be helpful to test terminal compatibility across different TERM types and mobile SSH apps.

What Should Happen?

Output should render correctly regardless of terminal emulator. The crash completely destroys any coding capabilities, not even an md file can be created, it just dies.

Error Messages/Logs

Error:
  ERROR undefined is not a constructor (evaluating 'new U($,A)')
  /$bunfs/root/claude:1147:5029
  Full stack trace:
  /$bunfs/root/claude:1147:5029
  - <anonymous> (/$bunfs/root/claude:1147:5029)
  - useMemo (/$bunfs/root/claude:170:102665)
  - <anonymous> (/$bunfs/root/claude:45:7784)
  - <anonymous> (/$bunfs/root/claude:1147:4975)
  - gU (/$bunfs/root/claude:170:20697)
  - mU (/$bunfs/root/claude:170:39069)
  - OH (/$bunfs/root/claude:170:36452)
  - ZH (/$bunfs/root/claude:170:35987)
  - GHH (/$bunfs/root/claude:170:52051)
  - w5 (/$bunfs/root/claude:170:85872)
 
  The error references code around Chalk (terminal color library) and syntax highlighting modules.

Steps to Reproduce

Termius Android app, SSH to linux server, run claude code, instruct to write any code.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.72

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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