Highlights
Verbose / Debug / native exe stderr are now visible to the AI. Pre-1.8 the tool description explicitly told you "Verbose and Debug streams are NOT visible to you" and native exe stderr (e.g. cmd /c '... 1>&2') was effectively swallowed. They now appear in the AI response in the same time-ordered position as everything else — closing the AI's biggest documented blind spot in the Output→Error→Warning→Verbose→Debug capture surface.
New Features
- Hybrid stream capture: chronological pipeline replaces bucketed sections. Output, Error, Warning, Verbose, and Debug records now interleave in a single time-ordered text block in the AI response — the AI sees each event in its actual position relative to surrounding output. Pre-1.8 the four separate
=== ERRORS ===/=== WARNINGS ===etc. sections lost the "warning fired between step-A and step-B, then the error hit" context. - Five output channels that used to bypass the AI's view are now captured:
Write-Verbose(was the AI's blind spot that the tool description explicitly called out as "Verbose and Debug streams are NOT visible to you").Write-Debug(same).[Console]::WriteLine/[Console]::Error.WriteLinedirect writes (and any .NET interop that writes toSystem.Consolewithout going through PowerShell streams) → new=== CONSOLE.OUT (direct) ===/=== CONSOLE.ERR (direct) ===sections.- Native exe stderr (
cmd /c "..."-style) → ErrorRecord in the chronological pipeline, in emit order alongside surrounding output. What if:text from$PSCmdlet.ShouldProcessand direct$Host.UI.WriteLinecalls → new=== HOST.UI (direct) ===section.
- Auto-route on busy console. When
invoke_expressionfinds the chosen PowerShell console busy with a user-typed or another AI command, the proxy now spawns a new console at the source's cwd and re-runs the pipeline there in the same tool call. Pre-1.8 the AI gotPipeline NOT executed - verify location and re-executeand had to re-send manually with whatever cwd they wanted, costing two MCP round-trips for every busy race. LastExit: Nstatus-line tag surfaces the case where a pipeline overall succeeded ($?is true) but a native exe within it returned non-zero. The green ✓ badge no longer silently hides those signals.
Bug Fixes
get_current_locationnow sets the window title when it claims an unowned console. Pre-fix, an AI whose first tool call wasget_current_location(instead ofinvoke_expressionorstart_console, both of which already handled this) left the user's pre-existingImport-Module PowerShell.MCPconsole with the placeholder title#PID ____until some later tool call redrew it. Symptom appeared intermittently depending on which tool the AI happened to call first.
Improvements
- Real-time streaming preserved through the new capture wiring — items render to the visible console as they arrive, not collected and rendered after the pipeline finishes.
- Color preserved on the visible console for every stream type: red
Write-Error, yellowWARNING:, yellowVERBOSE:/DEBUG:prefixes, andWrite-Host's user-chosenForegroundColor. Write-Progresskeeps rendering on the visible console for AI-initiated commands (Compress-Archive,Invoke-WebRequest, etc.) so the user can watch progress. Each redraw of pwsh 7's "Minimal" Progress view also writes the bar text toConsole.Out; the polling engine recognizes those overlay blocks by their reverse-video bracketed-status framing — an ANSI SGR escape, then[, then a reverse-video toggle (ESC[7m…ESC[27m), then]and reset (ESC[0m) — and strips them from the captured=== CONSOLE.OUT (direct) ===buffer before surfacing to the AI, so the response stays clean.
Internal
- New
TeeTextWriterfor[Console]::Out/[Console]::Errortee, written to in parallel with the original streams so visible-console output is unaffected. - New
TeePSHostUserInterfacedecorator wrapping$Host.UI(reflected swap on_externalUI) for host-UI-level capture ofWrite/WriteLinepaths that bypass both PowerShell streams and[Console]::Out. - Stream merge map widened to
2>&1 3>&1 4>&1 5>&1. Stream 6 (Information) remains unmerged soWrite-Host's user-chosenForegroundColorsurvives to the visible console. - Single shared
BuildInitCommandnow drives the PowerShell init script for every non-Windows launcher (macOS tempFile, Linux Base64-encoded terminal launch, Linux headless ArgumentList path). Each platform keeps its own delivery mechanism for documented reasons — AppleScript echo on macOS, multi-shell quoting on Linux — but the script body and its single-quote escaping are now built in one place. xUnit pins the escaping for every platform that calls the helper.