MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / hasSession

Function hasSession

source code/tools/shared/spawnMultiAgent.ts:161–168  ·  view source on GitHub ↗

* Checks if a tmux session exists

(sessionName: string)

Source from the content-addressed store, hash-verified

159 * Checks if a tmux session exists
160 */
161async function hasSession(sessionName: string): Promise<boolean> {
162 const result = await execFileNoThrow(TMUX_COMMAND, [
163 'has-session',
164 '-t',
165 sessionName,
166 ])
167 return result.code === 0
168}
169
170/**
171 * Creates a new tmux session if it doesn't exist

Callers 1

ensureSessionFunction · 0.85

Calls 1

execFileNoThrowFunction · 0.85

Tested by

no test coverage detected