Branch: feat/iterm-monitor
Worktree: ~/ensemble/worktrees/iterm-monitor
Before: collab monitor always ran inside tmux (split pane if $TMUX was set, otherwise a detached ensemble-<ID> session you had to tmux attach to).
After: on macOS + iTerm2 without tmux, collab-launch.sh now opens the monitor in a native iTerm2 split pane via osascript. No tmux involvement at all.
scripts/open-iterm-monitor.sh(new) — AppleScript launcher. Modes:split(default),tab,window.scripts/collab-launch.sh— detection + fallback chain.skill/SKILL.md— bumped to6.1.0, documentsITERM_NATIVEmode and env vars.
COLLAB_MONITOR=none→ no monitor- Inside tmux (
$TMUXset) andCOLLAB_MONITOR != iterm→ tmux split pane (unchanged) - macOS +
TERM_PROGRAM=iTerm.app+ not in tmux → iTerm native split - Forced
COLLAB_MONITOR=iterm→ iTerm native split (errors out if not macOS/iTerm) - Otherwise → detached tmux session (legacy fallback)
Env vars:
COLLAB_MONITOR=tmux|iterm|none— force a modeCOLLAB_ITERM_MODE=split|tab|window— iTerm layout (defaultsplit)
Open a fresh Claude Code session inside this worktree:
cd ~/ensemble/worktrees/iterm-monitor
claudeThen ask Claude:
Test the collab skill in iTerm native mode. Launch a small collab task ("Say hi to each other and disband") and check that the monitor opens as an iTerm split pane, not a tmux session.
Claude should:
- Detect
ITERM_NATIVEin step 0 - Run
collab-launch(which callsscripts/collab-launch.shfrom this worktree — verify by checking the output saysMonitor opened (iTerm split)) - A new vertical split should appear in your current iTerm window showing the TUI monitor
- Wait in the background for
.finished - Show the summary when done
cd ~/ensemble/worktrees/iterm-monitor
./scripts/open-iterm-monitor.sh "$(pwd)" test-fake-id split
# Should open a new iTerm split. It will error on the monitor command
# because team 'test-fake-id' does not exist — that is expected.- The worktree uses the same
/usr/local/bin/collab-launchshim, which still points at~/ensemble/scripts/collab-launch.sh(main checkout). To actually exercise the new logic via the shim, either:- (a) Run the worktree's script directly:
./scripts/collab-launch.sh "$(pwd)" "task", OR - (b) Temporarily repoint the shim:
echo 'exec ~/ensemble/worktrees/iterm-monitor/scripts/collab-launch.sh "$@"' | sudo tee /usr/local/bin/collab-launch
- (a) Run the worktree's script directly:
- The installed collab skill at
~/.claude/skills/collab/SKILL.mdis not from this worktree. To test the updated skill text, copy it:cp skill/SKILL.md ~/.claude/skills/collab/SKILL.md(reversible —git checkout main -- skill/SKILL.mdin main worktree to restore). osascriptwill fail silently if iTerm2 is not the frontmost app when invoked; the script guards against iTerm not running at all but not against backgrounded state. If the split appears in the wrong window, that's why.- The iTerm pane is not tracked by any PID file. Cleanup on
disbanddoes not close it — user closes it manually (qin the monitor, or Cmd+W).
cd ~/ensemble
git worktree remove worktrees/iterm-monitor
git branch -D feat/iterm-monitor