"""Synthetic seed used for the manual browser reproduction.
Run from a checkout with its isolated dev server already running.
Supply MODEL from the configured Codex runtime; never publish that identifier.
After seeding: disable Continue threads after restarts in Settings > Maintenance,
restart only this checkout's server, reopen this thread, type /goal resume,
then press Stop if it appears. Record this interaction on both commits.
"""
import argparse
import os
import subprocess

parser = argparse.ArgumentParser()
parser.add_argument("--home", required=True)
parser.add_argument("--workspace", required=True)
a = parser.parse_args()

def cli(*args):
    subprocess.run(["node", "apps/server/src/bin.ts", *args, "--base-dir", a.home], check=True)

cli("project", "add", a.workspace, "--title", "Goal resume proof")
cli("thread", "start", "--provider", "codex", "--model", os.environ["MODEL"],
    "--title", "Goal resume proof", a.workspace,
    "/goal For the next ten minutes, repeatedly run a shell command that waits 30 seconds and then reports a numbered progress checkpoint. Do not mark the goal complete until ten minutes have passed.")
