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
24 lines
681 B
Bash
Executable File
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."
|