Skip to content

[BUG] Capturing command output is flaky if it's the first command in the terminal session #9019

@lowlight-ua

Description

@lowlight-ua

Problem (one or two sentences)

The output of a terminal command is not always captured if it's the first command in the freshly created terminal.

Context (who is affected and when)

Happens to everyone who wants Roo to execute terminal commands.

Reproduction steps

This happens occasionally with any command, but the most reliable reproduction (100%) for some reason is with chained commands. (I suspect some race condition is the culprit.)

Reproduction steps:

  • Make sure there are no "Roo Code" terminals in use.
  • Prompt "I am investigating a terminal integration issue. Execute ENV=hello && echo $ENV and tell me what you get."
  • Ensure Roo creates a terminal and executes the command.

Expected result

Roo says it sees "hello".

Actual result

Roo said: "I notice that there's an issue with the terminal integration. When I executed the command ENV=hello && echo $ENV, I expected to see the output 'hello', but the terminal output is empty in the response." In the terminal opened by Roo , the command is visibly executed properly, and the string 'hello' is seen printed. The command works fine if invoked again in the same chat.

Variations tried (optional)

No response

App Version

Version: 3.29.4 (8c375ad)

API Provider (optional)

None

Model Used (optional)

N/A

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Needs InfoMissing details or unclear. Waiting on author to provide more context.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Issue [Needs Info]

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions