#!/usr/bin/env bash
# Run from each installed checkout, with its own fresh dev server already running:
# T3CODE_DEV_SEED=0 vp run dev
# Usage: bash reproduce.sh /absolute/path/to/synthetic/git/project
set -eu
project="$1"
node apps/server/src/bin.ts project add "$project" --title 'Monitor proof' --base-dir .t3
node apps/server/src/bin.ts thread start "$project" 'Use orchestrator_capabilities then delegate_task to delegate exactly one asynchronous task to Claude Haiku (claudeAgent, claude-haiku-5-5). Child task: Use the native Monitor tool to run for i in 1 2 3; do sleep 15; echo EVENT_$i; done with label line monitor. Arm it and reply STARTED immediately, then reply with each EVENT when woken. When the stream ends reply MONITOR_DONE. Do not use Bash background tasks or polling. Parent: reply PARENT_STARTED after delegating; on each delivered child completion reply PARENT_RECEIVED and its result. Do not start any more tasks.' --provider claudeAgent --model claude-haiku-5-5 --title 'Monitor parent' --base-dir .t3 --json
