Skip to content

Support pets in VS Code integrated terminal with Sixel enabled #27335

Description

@Cx330-502

Summary

Codex CLI pets report that images are unavailable in the VS Code integrated terminal, even when VS Code image support is enabled and the terminal can display Sixel output. The same environment works when Codex is launched with TERM=xterm-sixel and TERM_PROGRAM unset, which suggests the display path works but Codex's terminal/image-protocol detection does not recognize this case.

Environment

  • Terminal UI: VS Code integrated terminal
  • Remote environment: VS Code Remote WSL
  • Shell: zsh
  • VS Code version / terminal program version observed: TERM_PROGRAM_VERSION=1.123.0
  • VS Code setting enabled:
"terminal.integrated.enableImages": true

Observed environment variables before workaround:

TERM=xterm-256color
TERM_PROGRAM=vscode
TERM_PROGRAM_VERSION=1.123.0

No Kitty / WezTerm / Windows Terminal / tmux / zellij related variables were present in the checked output.

Reproduction

  1. Enable image support in VS Code settings:
"terminal.integrated.enableImages": true
  1. Open a VS Code integrated terminal connected to WSL.
  2. Run Codex CLI normally:
codex
  1. Enable/use pets.

Actual behavior

Codex reports:

⚠ Pets aren’t available in this terminal. Terminal pets need image support, and this terminal environment doesn’t expose a supported image protocol. Try a terminal with Kitty graphics or Sixel support, or run Codex outside tmux.

Workaround

Launching Codex like this makes pets work in the same VS Code integrated terminal:

env -u TERM_PROGRAM TERM=xterm-sixel codex

This suggests that VS Code's terminal image support is functional, but Codex's automatic image protocol detection does not recognize this environment.

Expected behavior

Codex should either:

  1. Detect VS Code integrated terminal image support when Sixel/iTerm inline image support is available, or
  2. Provide an explicit config/env override for the image protocol so users do not need to spoof TERM and unset TERM_PROGRAM.

Notes

This may be a compatibility gap in the pets image protocol detection path: TERM_PROGRAM=vscode appears to take precedence over the fact that the terminal can handle image output when VS Code's image support is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or requestpets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions