Files
rose-ash/scripts/sx-loops-down.sh
giles d7070ee901 Local sx-loops tmux launcher: 7 claude sessions, one per language
sx-loops-up.sh spawns a tmux session 'sx-loops' with 7 windows (lua,
prolog, forth, erlang, haskell, js, hs). Each window runs 'claude'
and then /loop against its briefing at plans/agent-briefings/<x>-loop.md.
Optional arg is the interval (e.g. 15m); omit for model-self-paced.

Each loop does ONE iteration per fire: pick the first unchecked [ ] item,
implement, test, commit, tick, log — then stop. Commits push to
origin/loops/<lang> (safe; not main).

sx-loops-down.sh sends /exit to each window and kills the session.

Attach with: tmux a -t sx-loops
2026-04-24 16:43:40 +00:00

24 lines
681 B
Bash
Executable File

#!/usr/bin/env bash
# Stop the sx-loops tmux session. Prompts the claude sessions to exit cleanly
# first (/exit in each window), then kills the tmux session after a grace
# period. Loops stop immediately; in-progress iterations commit what they have.
set -euo pipefail
SESSION="sx-loops"
if ! tmux has-session -t "$SESSION" 2>/dev/null; then
echo "No sx-loops session running."
exit 0
fi
WINDOWS=$(tmux list-windows -t "$SESSION" -F '#W')
for w in $WINDOWS; do
tmux send-keys -t "$SESSION:$w" "/exit" C-m 2>/dev/null || true
done
echo "Sent /exit to all windows. Waiting 5s for clean shutdown..."
sleep 5
tmux kill-session -t "$SESSION"
echo "Killed sx-loops session."