Skip to main content

Simulation commands

tpc sim runs coding agents against tasks for your product in sandboxes and scores each attempt. This page lists every command group with examples to start from. The Agent experience guides explain tasks, environments, runs and experiments. Commands need --scope <org-slug>/<product-slug>, and most need a signed-in session from tpc auth login; they reject API keys. Some reads and the repository commands experiment bind, bindings, compare and export also accept an API key with the matching simulations:* scope. Tag commands need only --scope <org-slug>. tpc sim spec, tpc sim experiment validate-signal-config and the local repository commands (experiment init, validate and plan) need neither. Add --format json for machine-readable output.

Tasks

A new task has no environments; attach at least one before you run it. tpc sim create --file simulation.json does both: it creates the task and attaches it to the existing environments listed in environmentIds. tpc sim task run queues one run per linked, enabled environment; --environment-id env_a,env_b limits it to those. tpc sim task list, get, update and delete work as the Tasks guide shows. delete is a soft delete that keeps run history.
  • duplicate copies the definition, goals and category into a new task, named Copy of <name> unless you pass --name. The copy has no environments.
  • export writes task.json and instruction.md, plus environment.json when exactly one environment is linked. It includes init commands in full, records each init file’s source (repository, ref and target path, or the zip’s file name) but not zip contents, and lists secret names but never their values. --force overwrites an earlier export.
  • tpc sim run <dir> creates the task, or updates or reuses one with the same name, and does the same for environment.json, then queues runs. Running it again never creates duplicates.

Init commands and init files

  • init-commands set replaces the whole list. It takes a JSON array of {label?, command, cwd?, timeoutMs?} or @<file>, and --commands none clears it. timeoutMs defaults to 5 minutes.
  • init-file add clones a git repository into the sandbox before each run: --git-ref defaults to the repository’s default branch, --target-path to /home/agent-user, and --auth-secret-ref names a secret holding a git token for a private repository. Zip uploads need the web app.
  • init-file clear removes every init file from the task. There is no command to remove just one.
Paths, timeouts and counts have limits. See Limits & constraints.

Task secrets

tpc sim task secret set|list|link manages secrets that every run of the task receives, in any environment. Repository tasks use them for verifier keys; see Verifier secrets.

Tags

Tags belong to the organization and label tasks.
Tag names are stored in lowercase and are unique in the organization. task tag add and remove take tag names or IDs; the tags must already exist. task tag remove leaves the tag in the organization. tag delete takes the tag ID and removes the tag from every task and environment.

Runs and analysis

tpc sim run <task-id> queues runs like tpc sim task run. run get shows the score, usage and the reasoning effort and speed the run used; run logs and run actions show its timeline and normalized actions. analysis get takes exactly one of --run-id or --task-id; add --force to regenerate a run’s analysis. See Inspecting runs from the CLI.

Experiments

  • run starts a new iteration: one run per task and environment. --watch, like tpc sim experiment run status <experiment-id> --watch, polls every 5 seconds until the iteration completes or fails. Ctrl+C stops polling, not the iteration. run status prints the saved failure reason of each failed run.
  • results reads the latest iteration, or --iteration <n>. When the iteration records it, results show execution coverage: runs executed, runs that did not start and runs scored. With no scored run, the average score reads unknown. --error-category <name> shows the full log of each error in that category.
  • signals and validate-signal-config work with signal configs; see Signals.
Change what an experiment runs:
task add|remove and env add|remove change one item and succeed without changes when there is nothing to do. update --task-ids and --env-ids replace the whole list. Removing a task or environment unlinks it; it doesn’t delete it. Changes apply from the next iteration.
delete hides the experiment and its iterations from lists and the web app, and the CLI can’t undo it. Its runs keep their scores and logs and stay in tpc sim run list.