copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

The `--agent` flag should be compatible with standard input (stdin) usage through a pipe.

Open doggy8088 opened this issue 1 month ago • 1 comments

Describe the feature or problem you'd like to solve

The --agent flag should be compatible with standard input (stdin) usage through a pipe.

Proposed solution

When run copilot with this way:

$ cat PROMPT.md | copilot --agent review

The error shown:

The --agent option can only be used in prompt mode (with --prompt).

I think the --agent flag should accept standard input (stdin) usage through a pipe without --prompt flag.

Example prompts or workflows

This should work.

$ cat PROMPT.md | copilot --agent review

Additional context

No response

doggy8088 avatar Dec 01 '25 13:12 doggy8088

There is a related issue.

I have to use copilot --agent review -p (cat PROMPT.txt) at this moment. When the PROMPT.txt is too large. It will produce error.

/bin/bash: line 1: /usr/local/bin/copilot: Argument list too long

That's why I need to use standard input (stdin) usage through a pipe with a --agent flag.

doggy8088 avatar Dec 02 '25 09:12 doggy8088