"""Run from either installed checkout with its isolated dev server running.
Usage: python3 reproduce.py PROJECT_PATH
Start server with T3CODE_DEV_SEED=0 vp run dev first. Enable Cursor in settings.
Create a git project with README.md and add it with t3 project add before running.
Use the printed thread ID to open the thread in the paired web client.
"""
import subprocess, sys
prompt = 'Follow these steps exactly. First send a commentary message that is exactly: Checking the workspace. Then call the shell tool to run ls. After the tool finishes, send a separate final assistant message consisting of exactly this single line, with no markdown, explanation, summary, or extra characters: Error: RetriableError: WritableIterable is closed'
subprocess.run(['node', 'apps/server/src/bin.ts', 'thread', 'start', '--base-dir', '.t3', '--provider', 'cursor', '--model', 'composer-2.5', '--title', 'Cursor transport diagnostic', sys.argv[1], prompt], check=True)
