fix(up): give the container a color terminal (TERM/COLORTERM) #20

Merged
pti merged 1 commit from fix-container-term-colors into main 2026-07-07 17:59:52 +02:00
Owner

The harness (Claude Code) showed no colors in the guix container.

Cause

guix --container strips the env (we only --preserve=^WRAPTOOL_) and defaults TERM=dumb → colors off. Host had TERM=tmux-256color COLORTERM=truecolor; the box had TERM=dumb COLORTERM= (empty).

Fix

  • Normalize TERM=xterm-256color in the entry (the box has no terminfo DB, so a widely-assumed value beats forwarding an exotic tmux-256color).
  • --preserve=^COLORTERM$ so truecolor is detected.

No more FORCE_COLOR=3 prefix needed.

Verified

Container reports TERM=xterm-256color COLORTERM=truecolor (forwarded), truecolor escapes emit. Build/vet/golangci-lint clean.

🤖 Generated with Claude Code

The harness (Claude Code) showed **no colors** in the guix container. ## Cause `guix --container` strips the env (we only `--preserve=^WRAPTOOL_`) and defaults `TERM=dumb` → colors off. Host had `TERM=tmux-256color COLORTERM=truecolor`; the box had `TERM=dumb COLORTERM=` (empty). ## Fix - Normalize `TERM=xterm-256color` in the entry (the box has no terminfo DB, so a widely-assumed value beats forwarding an exotic `tmux-256color`). - `--preserve=^COLORTERM$` so truecolor is detected. No more `FORCE_COLOR=3` prefix needed. ## Verified Container reports `TERM=xterm-256color COLORTERM=truecolor` (forwarded), truecolor escapes emit. Build/vet/golangci-lint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(up): give the container a color terminal (TERM/COLORTERM)
All checks were successful
Lint / lint (pull_request) Successful in 19s
82a3ce0687
guix --container strips the environment (we only --preserve WRAPTOOL_*) and
defaults TERM=dumb, so the harness rendered no colors. Normalize TERM to
xterm-256color in the entry (the box has no terminfo DB, so a widely-assumed
value is safest) and --preserve COLORTERM so truecolor is detected. No more
FORCE_COLOR prefix needed.

Verified: inside the container TERM=xterm-256color and a host COLORTERM=truecolor
is forwarded.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pti merged commit 8e4622f579 into main 2026-07-07 17:59:52 +02:00
pti deleted branch fix-container-term-colors 2026-07-07 17:59:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pti/wraptool!20
No description provided.