Skip to content

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

Closed

Description

@doggy8088

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

Activity

  1. added theissue type on Dec 1, 2025
  2. doggy8088 commented on Dec 2, 2025

    @doggy8088
    Author

    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.

  3. MackinnonBuck commented on Mar 9, 2026

    @MackinnonBuck

    Thanks for the suggestion! This has been fixed as of version 0.0.380.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions