MCPcopy
hub / github.com/codeaashu/claude-code / isInsideTmux

Function isInsideTmux

src/utils/swarm/backends/detection.ts:50–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 * on the system, not just if THIS process is inside tmux.
49 */
50export 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.

Callers 6

detectAndGetBackendFunction · 0.70
spawnMethod · 0.70
handleSpawnSplitPaneFunction · 0.50
useSwarmBannerFunction · 0.50
useInboxPollerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected