Skip to content

Prevent StreamingHost feedback loops in Receive-Job - #71

Draft
Steve Lee (SteveL-MSFT) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-duplicate-verbose-messages
Draft

Steve Lee (SteveL-MSFT) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-duplicate-verbose-messages

Conversation

Copilot AI commented Nov 4, 2026 •

Copy link
Copy Markdown

With -StreamingHost $Host, Receive-Job -Wait -Verbose or -Debug can repeatedly replay a single message, generating excessive logs.

  • Host isolation: Supply the streaming host through PSInvocationSettings.Host for initialization and main scripts rather than sharing the caller’s internal host with another runspace.
  • Stream routing: Avoid buffering host-streamed verbose, debug, warning, and progress records for replay. Preserve success output, errors, and information records—including silent information.
  • Coverage and help: Add regression coverage for single-message delivery and retained records; document buffering behavior.
Start-ThreadJob -StreamingHost $Host {
    Write-Verbose 'yo' -Verbose
    Start-Sleep -Seconds 2
} | Receive-Job -Wait -Verbose
# VERBOSE: yo — once

Copilot AI and others added 2 commits November 4, 2026 17:53
Co-authored-by: SteveL-MSFT <11859881+SteveL-MSFT@users.noreply.github.com>
Co-authored-by: SteveL-MSFT <11859881+SteveL-MSFT@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix duplicated verbose messages on StreamingHost of Receive-Job Prevent StreamingHost feedback loops in Receive-Job Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicated Verbose Messages on StreamingHost of Receive-Job with Wait and Verbose flags present

2 participants