Skip to content

fix: pass locale env to managed tmux sessions#690

Open
wierdbytes wants to merge 1 commit intogastownhall:mainfrom
wierdbytes:fix/locale-passthrough-launchd
Open

fix: pass locale env to managed tmux sessions#690
wierdbytes wants to merge 1 commit intogastownhall:mainfrom
wierdbytes:fix/locale-passthrough-launchd

Conversation

@wierdbytes
Copy link
Copy Markdown

Summary

  • Add LANG, LC_ALL, LC_CTYPE to passthroughEnv() whitelist
  • Fall back to en_US.UTF-8 when LANG is unset (launchd supervisor)

Problem

The supervisor runs as a launchd service (com.gascity.supervisor) which does not inherit the user's shell environment. LANG/LC_ALL are absent from managed tmux sessions, causing TUI tools like Claude Code to misrender UTF-8 glyphs — e.g. block characters (, ) in the statusline appear as diamonds.

The chain: launchd → gc supervisor (no LANG) → passthroughEnv() skips LANG (empty) → tmux -e flags omit it → Claude Code starts without UTF-8 locale → ambiguous-width Unicode characters render incorrectly.

Test plan

  • TestPassthroughEnvLANGFallback — verifies fallback to en_US.UTF-8 when LANG is unset
  • TestPassthroughEnvLANGPassthrough — verifies user's LANG is preserved when set
  • Manual: gc stop && gc start, then gc session attach mayor — Claude Code statusline renders ▓░ correctly

The supervisor runs as a launchd service (com.gascity.supervisor)
which does not inherit the user's shell environment. This means
LANG and LC_ALL are absent from managed tmux sessions, causing
TUI tools like Claude Code to misrender UTF-8 glyphs (e.g. block
characters in the statusline appear as diamonds).

Add LANG, LC_ALL, and LC_CTYPE to the passthroughEnv whitelist,
with a fallback to en_US.UTF-8 when LANG is unset.
@github-actions github-actions bot added the status/needs-triage Inbox — we haven't looked at it yet label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/needs-triage Inbox — we haven't looked at it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant