#!/usr/bin/env bash # Drive an INTERACTIVE Claude Code session in tmux, send a prompt, wait for the # agent to finish, then print the tool-call breakdown from the session logs. # # Why interactive (not `claude -p`): headless print-mode picks the # general-purpose subagent, while real interactive sessions delegate to the # Explore subagent (or drive codegraph from the main thread). Only the # interactive TUI reproduces the behavior users actually see. (Idle-detection # technique borrowed from devpit's WaitForIdle.) # # Usage: itrun.sh