Skip to content

[Bug]: ERROR: Windows stdio in console mode does not support writing non-UTF-8 byte sequence #3072

@Alexx999

Description

@Alexx999

Bug Description

On Windows REPL gets hard failure the moment a subprocess emits any non-UTF-8 byte — even though the command itself succeeded. You get a message that says:

ERROR: Windows stdio in console mode does not support writing non-UTF-8 byte sequences

Steps to Reproduce

  1. Start forge on Windows.
  2. From the agent, have it invoke the shell tool with a command whose output contains non-UTF-8 bytes. Any of these work:
    • powershell -NoProfile -Command "Write-Host ([char]0x91 + 'hi' + [char]0x92)"
      (Windows-1252 curly quotes — invalid UTF-8.)
    • Read a file containing a Windows-1252 character:
      powershell -NoProfile -Command "Get-Content 'some-file-with-smart-quotes.txt'"
    • Run any binary that prints UTF-16 or OEM-codepage bytes.
  3. The tool call fails with the message above

Expected Behavior

A subprocess that prints non-UTF-8 bytes must not break the shell tool.

Actual Behavior

A subprocess that prints non-UTF-8 bytes breaks the shell tool.

Forge Version

2.11.3

Operating System & Version

Win11

AI Provider

Anthropic

Model

opus-4-7

Installation Method

Other

Configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    os: windowsWindows-specific issue or feature.type: bugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions