Describe the bug
The Copilot CLI binary overrides TERM=xterm-256color to TERM=xterm-color (8 colors) when spawning its bash subshells. This causes diff highlighting to show no colors at all — only +/- markers are visible with no red/green background highlighting, making it impossible to review changes.
Screenshot
The diff shows + and - markers but no red/green color highlighting. All text is the same color, making it very difficult to identify changes.
Evidence
The parent copilot process inherits the correct TERM from the terminal:
Parent copilot process: TERM=xterm-256color, COLORTERM=truecolor
Child bash subprocess: TERM=xterm-color, COLORTERM=truecolor
Verified via ps -p <copilot_pid> -E — the parent has xterm-256color, but the spawned bash --norc --noprofile subprocess gets xterm-color (only 8 colors).
Impact
- Diff output shows
+ and - markers but zero color highlighting (no red/green backgrounds)
- All CLI themes tested (
default, high-contrast, dim, colorblind) show the same issue
- Development workflow is blocked — cannot visually review proposed changes
- This works correctly on Windows, where TERM is not overridden
Environment
- Copilot CLI version: 1.0.34 (binary at
/opt/homebrew/Caskroom/copilot-cli/1.0.32/copilot)
- OS: macOS (Darwin, Apple Silicon)
- Terminals tested: Ghostty 1.3.1, macOS Terminal.app — same result in both
- Terminal multiplexer: Zellij (but TERM is correct before CLI overrides it)
- Shell: zsh (CLI spawns
bash --norc --noprofile)
Steps to reproduce
- On macOS, confirm terminal has
TERM=xterm-256color (e.g. Ghostty, iTerm2, Terminal.app)
- Launch
copilot
- Ask Copilot to edit any file
- Observe the diff preview — no color highlighting on added/removed lines
- Verify inside the CLI session:
echo $TERM shows xterm-color instead of the terminal's xterm-256color
Expected behavior
The CLI should preserve the terminal's TERM value (xterm-256color) or at minimum use COLORTERM=truecolor (which IS correctly inherited) for rendering decisions. Diff highlighting should show colored backgrounds for added/removed lines.
Related issues
Describe the bug
The Copilot CLI binary overrides
TERM=xterm-256colortoTERM=xterm-color(8 colors) when spawning its bash subshells. This causes diff highlighting to show no colors at all — only+/-markers are visible with no red/green background highlighting, making it impossible to review changes.Screenshot
Evidence
The parent copilot process inherits the correct TERM from the terminal:
Verified via
ps -p <copilot_pid> -E— the parent hasxterm-256color, but the spawnedbash --norc --noprofilesubprocess getsxterm-color(only 8 colors).Impact
+and-markers but zero color highlighting (no red/green backgrounds)default,high-contrast,dim,colorblind) show the same issueEnvironment
/opt/homebrew/Caskroom/copilot-cli/1.0.32/copilot)bash --norc --noprofile)Steps to reproduce
TERM=xterm-256color(e.g. Ghostty, iTerm2, Terminal.app)copilotecho $TERMshowsxterm-colorinstead of the terminal'sxterm-256colorExpected behavior
The CLI should preserve the terminal's TERM value (
xterm-256color) or at minimum useCOLORTERM=truecolor(which IS correctly inherited) for rendering decisions. Diff highlighting should show colored backgrounds for added/removed lines.Related issues