Skip to content

Agent container lacks TTY, breaking color detection and interactive output #1427

@Mossaka

Description

@Mossaka

Problem

The agent container does not allocate a pseudo-TTY, causing isatty() / process.stdout.isTTY to return false. Many CLI tools and test frameworks use TTY detection to decide whether to emit ANSI color codes, and their tests assert on colored output.

This causes widespread snapshot test failures and output mismatches in tools that rely on terminal detection.

Examples

  • Node.js CLI tools using chalk, kleur, or supports-color
  • Python tools using rich or click with ANSI output
  • Deno CLI tools using Deno.isatty()
  • Go tools using isatty checks
  • Test frameworks comparing colored vs plain output

Suggested Fix

Set the following environment variables in the agent container's entrypoint.sh:

export FORCE_COLOR=1
export COLUMNS=120
export TERM=xterm-256color

Alternatively, allocate a pseudo-TTY via Docker's --tty flag if feasible.

Impact

Affects snapshot tests and output assertions across many language ecosystems. Setting FORCE_COLOR=1 is safe — it only affects tools that already support the flag (per the force-color convention).

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions