()
| 48 | * on the system, not just if THIS process is inside tmux. |
| 49 | */ |
| 50 | export async function isInsideTmux(): Promise<boolean> { |
| 51 | if (isInsideTmuxCached !== null) { |
| 52 | return isInsideTmuxCached |
| 53 | } |
| 54 | |
| 55 | // Check the original TMUX env var (captured at module load) |
| 56 | // This tells us if the user started Claude from within their tmux session |
| 57 | // If TMUX is not set, we are NOT inside tmux - period. |
| 58 | isInsideTmuxCached = !!ORIGINAL_USER_TMUX |
| 59 | return isInsideTmuxCached |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Gets the leader's tmux pane ID captured at module load. |
no outgoing calls
no test coverage detected