You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Spawned agent CLIs inherit no locale on macOS, corrupting non-ASCII text via pbcopy #6231
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
Launch T3 Code from Finder/Dock (not from a terminal — that's what makes the difference).
In an agent session, run locale → LANG="", LC_CTYPE="C".
Run printf 'Grüße – ß\n' | pbcopy
Paste into any app.
Expected behavior
Grüße – ß
Actual behavior
Grüße – ß
UTF-8 decoded as MacRoman: ü (C3 BC) → √º, – (E2 80 93) → ‚Äì.
Root cause
Agent CLIs are spawned with no LANG/LC_ALL/LC_CTYPE, so their child shells run in the C locale. pbcopy does not pass bytes through — it decodes stdin using the locale encoding, so non-ASCII output is corrupted on the way to the clipboard.
GUI-launched macOS apps inherit a minimal launchd environment with no locale vars. The same claude binary run from a terminal is unaffected, since the terminal supplies the locale.
Impact
Major degradation or frequent failure
Version or commit
0.0.34-nightly.20260811.1068
Environment
macOS (Darwin 25.5.0), Apple Silicon. Launched from Finder/Dock.
Logs or stack traces
# environment of the spawned agent process
$ ps -Ewww -p <claude_pid>| tr '''\n'| grep -E '^(LANG|LC_|__CF)'
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3
# (no LANG, LC_ALL, or LC_CTYPE)
$ printf'Grüße – ß\n'| pbcopy && pbpaste
Grüße – ß
$ printf'Grüße – ß\n'| LC_ALL=C.UTF-8 pbcopy && pbpaste
Grüße – ß
Screenshots, recordings, or supporting files
No response
Workaround
Set a UTF-8 locale per agent, e.g. "env": { "LANG": "C.UTF-8" } in ~/.claude/settings.json. Each spawned CLI needs its own equivalent.
Activity