Skip to content

Response text missing from stdout in -p (non-interactive) mode; only stats are written #3544

@polajenko

Description

@polajenko

Bug Report

Description

When using copilot -p (non-interactive/programmatic mode), the assistant's response text is never written to stdout. Only the stats footer and extension notifications appear. The response is rendered to the TUI/alt-screen buffer instead, making it impossible to capture via piping or redirection.

Steps to Reproduce

copilot -p "what is 1+1?" --yolo

Expected Output

2

Actual Output

⚡ Aegis extension loaded (with dashboard)

Changes    +0 -0
Requests   1 Premium (10s)
Tokens     ↑ 29.9k (11.0k cached) • ↓ 5

The response content (2) is completely absent from stdout. Confirmed by capturing raw bytes — no response text present at all.

Also Tested

  • --yolo -s → empty output (silent flag also broken)
  • --allow-all-tools → same issue
  • --screen-reader → same issue
  • --no-custom-instructions → same issue
  • --no-color → same issue

Workaround

--output-format json works and the response can be parsed from assistant.message events:

copilot -p "what is 1+1?" --yolo --output-format json |
  ForEach-Object { try { $_ | ConvertFrom-Json } catch {} } |
  Where-Object { $_.type -eq "assistant.message" } |
  ForEach-Object { $_.data.content }

Environment

  • CLI Version: 1.0.54
  • OS: Windows (PowerShell)
  • The -p flag is documented as supporting scripting use cases, so this is a blocking issue for automation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions