Thanks to visit codestin.com
Credit goes to github.com

Skip to content

"git status" command (through run_in_terminal tool) includes trailing part of the command itself #298837

@brycehutchings

Description

@brycehutchings
  • Copilot Chat Extension Version: 0.37.9
  • VS Code Version: 1.109.5
  • OS Version: Windows 11
  • Feature (e.g. agent/edit/ask mode): Agent mode
  • Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Claude Opus 4.6

I have a code review agent and it issued the following command:

git --no-pager diff --merge-base origin/HEAD HEAD --name-status

And the response that it captured is:

tus                                                                             M       src/foo/bar.cpp

There this "tus" at the beginning is actually from the "--name-status" getting included in the output. This confuses the AI agent where it says: "The output seems truncated. Let me try again with a different approach." and then it tries:

git --no-pager diff --merge-base origin/HEAD HEAD --name-status 2>&1

Which has the following captured output:

tus 2>&1                                                                        M       src/foo/bar.cpp

And again it says "The output looks like it might be getting cut off at the start. Let me try a different approach ..."

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions