#!/usr/bin/env bash
# Run from each isolated checkout after vp i.
# Start the app separately with T3CODE_DEV_SEED=0 and COPILOT_GITHUB_TOKEN set.
# Configure provider instance copilotProof:
# {"driver":"acpRegistry","displayName":"GitHub Copilot","config":{"source":"registry","agentId":"github-copilot-cli"}}
set -eu
project_id=$1
node apps/server/src/bin.ts thread start --base-dir .t3 --provider copilotProof --model claude-haiku-4.5 --title 'Background subagents' --json "$project_id" 'Launch two native Copilot task agents concurrently using task mode background: one explore agent and one general-purpose research agent. Each should inspect packages/provider-acp/src/server/adapter.ts with several searches and file reads, then write a complete 500-word summary of background subagent routing. Do not include absolute filesystem paths or machine names. Tell each child to take at least 30 seconds of research. After launching both, immediately finish your parent reply with "Both agents launched"; do not wait, poll, or call read_agent until I ask.'
# Open the returned thread in the web app. Observe the parent reply while children work.
# After both finish, open each child and inspect tools and final responses.
# Then run this with the returned parent thread id:
# node apps/server/src/bin.ts thread send --base-dir .t3 "$thread_id" 'Use read_agent to retrieve the full result and tool count of both native background agents now. If still running, wait for completion. Quote their final responses fully in your reply, replacing any absolute filesystem paths with relative paths. Do not launch any more agents.'
# Captures: Linux web client, 1280x800, light theme, fresh unseeded database per commit.
# Hide sidebar and thread details to exclude machine labels; do not modify conversation content.
