From 6414594a4c061bad7cb47277c839019af8483e79 Mon Sep 17 00:00:00 2001 From: mkorwel Date: Wed, 18 Mar 2026 23:22:00 -0700 Subject: [PATCH] fix(workspaces): restore tmux for persistent sessions --- .gemini/skills/workspaces/scripts/orchestrator.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gemini/skills/workspaces/scripts/orchestrator.ts b/.gemini/skills/workspaces/scripts/orchestrator.ts index b3a193f0ab..141fba6aa3 100644 --- a/.gemini/skills/workspaces/scripts/orchestrator.ts +++ b/.gemini/skills/workspaces/scripts/orchestrator.ts @@ -95,9 +95,11 @@ export async function runOrchestrator(args: string[], env: NodeJS.ProcessEnv = p const ghTokenRes = await provider.getExecOutput(`cat ${hostWorkspaceRoot}/.gh_token`); const remoteGhToken = ghTokenRes.stdout.trim(); - // DEBUG: Run directly in foreground WITHOUT tmux to see immediate errors const authEnv = `${remoteApiKey ? `-e GEMINI_API_KEY=${remoteApiKey} ` : ''}${remoteGhToken ? `-e GITHUB_TOKEN=${remoteGhToken} -e GH_TOKEN=${remoteGhToken} ` : ''}`; - const containerWrap = `sudo docker exec -it ${authEnv}maintainer-worker sh -c ${q(`cd ${remoteWorktreeDir} && ${remoteWorker}; exec $SHELL`)}`; + + // PERSISTENCE: Wrap the entire execution in a tmux session inside the container + const tmuxCmd = `tmux new-session -A -s ${sessionName} ${q(`cd ${remoteWorktreeDir} && ${remoteWorker}; exec $SHELL`)}`; + const containerWrap = `sudo docker exec -it ${authEnv}maintainer-worker sh -c ${q(tmuxCmd)}`; const finalSSH = provider.getRunCommand(containerWrap, { interactive: true });