Skip to content

Copilot CLI repeats action output indefinitely during PowerShell commands #817

@aleacosta5

Description

@aleacosta5

Describe the bug

The agent is now getting stuck in a response loop during certain actions and repeating the same output over and over.

This didn’t happen in previous versions. For instance, when I asked it to check for a DLL file, it echoed the same message repeatedly before finally running the command.

Affected version

0.0.371 Commit: e3fbcaf

Steps to reproduce the behavior

It seems to happen when the agent runs a Get-ChildItem command in PowerShell. In my example, I asked it to find a *.dll file, and the agent generated the following command internally:

Get-ChildItem -Path "$env:USERPROFILE\.agency\artifacts\corext-hybrid-repo-pkg-updater\ACES.PackageUpdater.Updates\tools\net8.0\any\" -Filter *.dll

Example output: (I tried to replicate the problem with CTRL+R enabled, but the outputs are the same)

Image

Expected behavior

A single output line. For example: "List DLL files in the specified repository" just once.

Additional context

  • Logs are attached
  • Operating system: Windows
  • CPU architecture: x64
  • Terminal emulator: Windows Terminal
  • Shell: PowerShell Core (pwsh)

Based on the logs, I observed multiple response chunks which might be causing the repeated outputs.

Example:

2025-12-19T22:53:08.555Z [DEBUG] Chunk received with choices missing finish_reason: {
  "choices": [
    {
      "index": 0,
      "delta": {
        "content": ", you",
        "role": "assistant"
      }
    }
  ],
  "created": 1766184788,
  "id": "d0eaff70-28c1-4dc1-8ce4-713a2b4d9c54",
  "model": "claude-sonnet-4.5"
}
2025-12-19T22:53:08.587Z [DEBUG] Chunk received with choices missing finish_reason: {
  "choices": [
    {
      "index": 0,
      "delta": {
        "content": " have multiple",
        "role": "assistant"
      }
    }
  ],
  "created": 1766184788,
  "id": "d0eaff70-28c1-4dc1-8ce4-713a2b4d9c54",
  "model": "claude-sonnet-4.5"
}
2025-12-19T22:53:08.632Z [DEBUG] Chunk received with choices missing finish_reason: {
  "choices": [
    {
      "index": 0,
      "delta": {
        "content": " DLL tools",
        "role": "assistant"
      }
    }
  ],
  "created": 1766184788,
  "id": "d0eaff70-28c1-4dc1-8ce4-713a2b4d9c54",
  "model": "claude-sonnet-4.5"
}

session-1a282ca9-bfc6-4b16-b18a-004152a91dd8.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions