Skip to content

Terminal Usage Fails with "VSCE output start escape sequence" ErrorΒ #2017

@libertyteeth

Description

@libertyteeth

Which version of the app are you using?

3.10.5

Which API Provider are you using?

Anthropic

Which Model are you using?

Claude 3.7 Sonnet

What happened?

Every time Roo Code invokes the terminal, it fails to read the output. Instead, it gives an error about "VSCE output start escape sequence", followed by a suggestion that it might be an "Upstream VSCE Bug?", and asks the user to use a supported shell. I am already using a supported shell, so this didn't make sense.

A big clue from "lateral testing" was that Cline didn't have this issue.

So I spent some time and tokens having AIs analyze the codebase.

The fix, from local testing: remove the sleep of 0.050 seconds (oddly significant!). :) This is in src/integrations/terminal/TerminalRegistry.ts; the line to comment out is (indented in the code):

PROMPT_COMMAND: "sleep 0.050",

The error message, which originates from Roo Code itself, was misleading -- pointing to an upstream issue when the fix was local.

(Also note, this issue persists across all models and API providers I tested, not just Anthropic's Claude 3.7 Sonnet.)

Steps to reproduce

  1. Use any model and API provider.
  2. Prompt: "Please run 'ls', we're testing if the terminal works."
  3. Observe the AI attempt to run ls, and fail with the "VSCE output start escape sequence" error.

Expected Behavior

The terminal command (ls or any other) should execute successfully without errors, as it does in Cline.

Actual Behavior

Roo Code throws the "VSCE output start escape sequence" error and fails to execute the command.

Proposed Fix

Remove the sleep 0.050 delay in the terminal-handling code. This resolves the issue in my testing.

Relevant API REQUEST output

Additional context

This Roo Code instance was running on Arch Linux, in Code OSS version 1.96.4. I have not tested any other platform. I realize that the sleep may have been needed on other platforms. Or, prior to the bug being fixed in VSCE? I saw this in my wandering:

microsoft/vscode#237208

The clue that brought me to this point, today, was: I was thinking, "What is different from my environment, that might impact a terminal?" I had a custom prompt. Having the AI investigate in that direction helped narrow it down.

Thank you so much for providing this wonderful tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions