Docs: Add tmux configuration guide for CLI users
Problem
Claude Code CLI is commonly run inside tmux, but there's no documentation covering the configuration needed for a smooth experience. This leads to several issues that are non-obvious to diagnose:
- Shift-Enter (newline input) doesn't work — tmux doesn't pass through extended key sequences by default
- Shell environment differences — the Bash tool executes in tmux's shell context, which may not have the same env vars, PATH, or shell functions as the user's login shell
- Color/rendering issues —
TERMvariable inside tmux can affect output rendering
Suggested fix
A short section in the docs (or a troubleshooting entry) covering the recommended tmux config:
# ~/.tmux.conf — recommended for Claude Code
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
And a note that the Bash tool's shell environment is mediated by tmux's shell initialization, not the user's interactive terminal profile — so missing env vars or commands that "work in my terminal" are likely a tmux isolation issue.
Why this matters
tmux is the default environment for power users of CLI tools. These config lines take 30 seconds to add but can take significant debugging time to discover when things silently break (key bindings fail, env vars are missing, etc.).
---
🤖 Generated with Claude Code
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗