Skip to content

UTF-8 encoding issue in ExecaTerminalProcess #4033

@mr-ryan-james

Description

@mr-ryan-james

Problem

I discovered an Encoding::CompatibilityError when running commands like pod install (CocoaPods/Ruby) within Roo Code's integrated terminal when the "Disable terminal shell integration" setting is enabled. The root cause is identified as the ExecaTerminalProcess not being configured with UTF-8 encoding, leading to character encoding compatibility issues in Ruby scripts.

The error message specifically suggested setting export LANG=en_US.UTF-8.

Root Cause Analysis

When users enable the "Disable terminal shell integration" setting, Roo Code switches from VSCode's built-in terminal to the ExecaTerminal implementation. This fallback path uses Node.js execa library via ExecaTerminalProcess, which is not inheriting proper UTF-8 locale settings.

Code Path When "Disable Terminal Shell Integration" is Enabled:

  1. executeCommandTool.ts:149provider = "execa"
  2. TerminalRegistry.ts:133new ExecaTerminal()
  3. ExecaTerminal.ts:21new ExecaTerminalProcess()
  4. ExecaTerminalProcess.ts → 🎯 Where UTF-8 issue is

Solution

Fix proposed in #3989

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions