#!/usr/bin/env bash
set -euo pipefail
# Run from each tested checkout after vp i and starting its dev server with:
# T3CODE_DEV_SEED=0 CLAUDE_CODE_SUBAGENT_MODEL=opus vp run dev
# Usage: bash reproduce.sh /absolute/path/to/fresh-sample-repo
sample=$1
mkdir -p "$sample"
git -C "$sample" init
printf '# Model recovery proof\n' > "$sample/README.md"
git -C "$sample" add README.md
git -C "$sample" -c user.name=Proof -c user.email=proof@example.com commit -m 'Initial sample'
node apps/server/src/bin.ts project add --base-dir .t3 --title 'Model recovery proof' "$sample"
node apps/server/src/bin.ts thread start --base-dir .t3 --title 'Foreground model proof' --provider claudeAgent --model claude-haiku-5-5 --option effort=medium --wait --json "$sample" "Use the Agent tool exactly once, in the foreground, with no model parameter and the general-purpose subagent type. Its prompt must be: 'Reply with only the word OK. Do not use any tools.' After it returns, reply with only DONE."
# Open the returned thread in the paired web client.
# Open Lineage > Previous agents > the completed child; inspect its model bar.
