From 6de14ec09862856efa3edd5a8b734b14ab1afd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Hou=C5=A1ka?= Date: Sat, 31 Oct 2026 17:29:36 +0100 Subject: [PATCH] docs(coding-agent): note tmux 3.6 color reply leak in tmux guide (#11645) Adds a troubleshooting section to the tmux guide (`packages/coding-agent/docs/tmux.md`, published at https://pi.dev/docs/latest/tmux) for the color-code text that tmux 3.6 types into the editor at startup. tmux 3.6 forwards Pi's palette queries to the outer terminal. When a reply reaches tmux split across reads, tmux treats its bytes as key presses and sends them to Pi as typed text. tmux 3.7 fixes this ([tmux#4749](https://github.com/tmux/tmux/issues/4749), [tmux#4793](https://github.com/tmux/tmux/issues/4793)). Pi cannot filter the text because it arrives exactly like typing. The section also notes that switching to a fixed theme does not help: `applyFromSettings()` queries terminal colors regardless of the theme, which reporters confirmed in #10679 (`--use-theme dark`) and #10256 (`"theme": "dark"`). Related: #10250, #10679, #10256. --- packages/coding-agent/docs/tmux.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/coding-agent/docs/tmux.md b/packages/coding-agent/docs/tmux.md index 091d61647..c781ffe0a 100644 --- a/packages/coding-agent/docs/tmux.md +++ b/packages/coding-agent/docs/tmux.md @@ -53,3 +53,7 @@ set -g extended-keys on Pi supports the xterm `modifyOtherKeys` format used by these versions. Restart tmux and repeat the verification steps. For older versions, upgrade tmux or use Pi outside tmux rather than relying on modified Enter shortcuts. + +## Color codes appear in the editor with tmux 3.6 + +If text such as `c0c/0c0c/0c0c` appears in the editor at startup, upgrade tmux to 3.7 or newer. tmux 3.6 sometimes sends the terminal's color replies to Pi as typed text ([tmux#4749](https://github.com/tmux/tmux/issues/4749)). Changing Pi's theme does not help.