feat(tmux): add killTmuxSessionIfExists utility for explicit session teardown

Adds killTmuxSessionIfExists(sessionName), a best-effort no-op when the
named session is absent. Drains both stdio streams so it does not leak
pipe buffers the way closeTmuxPane historically did.

Also exports ISOLATED_SESSION_NAME ("omo-agents") from session-spawn so
callers can tear down the shared isolated session without hard-coding
the name in multiple places.
This commit is contained in:
YeonGyu-Kim
2026-04-18 19:31:22 +09:00
parent 2a99a524ea
commit de8a0167e6
5 changed files with 228 additions and 2 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import { isInsideTmux } from "./environment"
import { isServerRunning } from "./server-health"
import { shellEscapeForDoubleQuotedCommand } from "../../shell-env"
const ISOLATED_SESSION_NAME = "omo-agents"
export const ISOLATED_SESSION_NAME = "omo-agents"
async function getWindowDimensions(
tmux: string,