Skip to content

Agent Host CLI output is garbled and shows the wrong management command on Windows #333375

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.136.0-insider
  • OS Version: Windows 11
  • Shell: Command Prompt using a non-UTF-8 console output code page

Steps to reproduce

  1. Run code-insiders agent host --tunnel.
  2. Observe the startup banner.
  3. Run code-insiders agent ps.

Actual behavior

Decorative UTF-8 characters are emitted as raw bytes and decoded using the active legacy Windows console code page, producing output such as:

Γ₧£  Tunnel:   https://insiders.vscode.dev/agents/tunnel/agent-host-1
ΓöÇΓöÇ standalone (pid 23484, 127.0.0.1:50151) [insider] ΓöÇΓöÇ
  ΓÜá AHP initialize failed: ...

The startup banner also hardcodes the stable command name:

Manage:   code agent ps  |  code agent kill

This is incorrect when invoked through code-insiders (and potentially other product qualities).

Expected behavior

  • Detect whether the active Windows console output code page is UTF-8. Preserve Unicode decorations when supported and use readable ASCII equivalents otherwise. Redirected output should remain UTF-8.
  • When a detached Agent Host supervisor produces the banner through a pipe, use the foreground CLI's terminal capability rather than the hidden supervisor process's console state.
  • Build management command hints from the product's configured applicationName, such as code-insiders, instead of hardcoding code.
  • Apply the encoding-safe decorations consistently to Agent Host banners, agent ps, agent logs, and pager status output.

Related: #332560 includes the same mojibake in its reproduction, although that issue tracks the separate AHP protocol-version mismatch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agent-hostIssues for the agent-host implementation (not the protocol)bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions