Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

Relationships

#2070 Windows: vault roundtrip model outputs UTF-16LE instead of UTF-8

Opened by stack72 · 9/8/2026· Shipped 9/9/2026

Description

On Windows, the vault-roundtrip model writes UTF-16LE encoded text (with null bytes interleaved) to its output file instead of UTF-8. This appears to be caused by the model's shell command running through a Windows shell (cmd.exe or PowerShell) that defaults to UTF-16LE for redirected output.

The issue is in model execution, not vault read-secret — the secret is stored and resolved correctly, but the model runtime's shell invocation produces the wrong encoding in the output file.

Steps to Reproduce

  1. On Windows, create a vault and store a secret
  2. Run a model that resolves the secret via vault expressions and writes it to a file
  3. The output file contains UTF-16LE encoded text (null bytes between characters)

Environment

  • Windows Server 2022 (GitHub Actions windows-latest)
  • swamp version: 20260902.194129.0-sha.d1808bea
  • Discovered via the Windows UAT runner (swamp-uat#363)

Impact

5 UAT test failures in the vault roundtrip e2e tests (special chars, slashes, multiline, quotes, backslashes). The model output file is unreadable as UTF-8.

Suggested Fix

Ensure the model runtime forces UTF-8 output encoding when invoking shell commands on Windows — e.g. setting [Console]::OutputEncoding for PowerShell or using chcp 65001 for cmd.exe, or writing output through a Deno file write rather than shell redirection.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 3 MORETRIAGE+ 11 MOREREVIEW+ 10 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/9/2026, 12:03:42 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack729/8/2026, 8:42:39 PM

Sign in to post a ripple.