Skip to content

Roo Code Fails to Retrieve Command Line Output When Using RPROMPT in Zsh #1083

Open
@norisuke3

Description

Which version of the app are you using?

3.3.21

Which API Provider are you using?

OpenRouter

Which Model are you using?

google/gemini-flash-1.5

What happened?

Summary

When using RPROMPT in .zshrc, the VS Code extension Roo Code fails to retrieve the output of the ls -la command, even though the command executes successfully and displays results correctly in the terminal in VS Code.

Steps to Reproduce

  1. Use the following minimal .zshrc configuration:
    RED=$'%{\e[1;31m%}'
    DEFAULT=$'%{\e[1;m%}'
    
    RPROMPT=$RED'[%~]'$DEFAULT
  2. Open VS Code and start a new terminal session (Zsh).
  3. In Roo Code, enter the following instruction:
    Tell me the output of the command ls -la.
  4. Observe that the LLM does not recognize or return the expected output.

Expected Behavior

The LLM model in Roo Code should be able to retrieve and report the ls -la output, as it appears correctly in the terminal in VS Code.

Actual Behavior

  • The command ls -la runs successfully in the terminal and displays the expected results.
  • However, Roo Code fails to retrieve the output and does not return it to the user.

Workaround

Disabling RPROMPT specifically in VS Code resolves the issue:

if [[ "$TERM_PROGRAM" != "vscode" ]]; then
    RPROMPT=$RED'[%~]'$DEFAULT
fi

System Information

  • VS Code Version:
    Version: 1.97.2 (Universal)  
    Commit: e54c774e0add60467559eb0d1e229c6452cf8447  
    Date: 2025-02-12T23:20:35.343Z  
    Electron: 32.2.7  
    ElectronBuildId: 10982180  
    Chromium: 128.0.6613.186  
    Node.js: 20.18.1  
    V8: 12.8.374.38-electron.0  
    OS: Darwin arm64 24.3.0  
    
  • OS: macOS 15.1.1
  • Shell: Zsh
  • Terminal Emulator: VS Code Integrated Terminal
  • Roo Code Version: 3.3.21
  • LLM Used: google/gemini-flash-1.5

Possible Cause

This issue appears to be related to how Roo Code processes terminal output when RPROMPT is enabled. The ANSI escape sequences in RPROMPT may interfere with how Roo Code captures and interprets command output, leading to the failure to recognize and return the results.

Additional Notes

  • The above RPROMPT configuration is a customization that displays the current directory (%~) in red on the right side of the terminal.
  • Fixing this in Roo Code would improve compatibility with Zsh configurations commonly used by developers.

Would appreciate any insights or fixes to ensure proper command output recognition in Roo Code! 🚀

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions