Recipes

A recipe is one YAML file that describes how to start a thread or a factory: the agent, the repository, the prompt or goal, the session options, and for a factory the stages and limits. Keep it in the repository next to the code it works on, review changes to it like any other project file, and start the work from it on another computer or server.

A recipe never contains secrets. Model keys and GitHub logins still come from Settings → Accounts on the runner that starts it, and the governance policy still applies.

Save a recipe

  • A thread: open the thread's More actions menu and choose Save setup as YAML…. The file

records the agent, the first message, the current model and options, and the repository when its address is known.

  • A factory: open the factory page and press Save YAML next to Save as template. The file

records the stages, their order and instructions, approval gates, each stage's options, the limits and the goal. The factory template stays in the app; the YAML is for the repository.

The dialog proposes a name such as Ship it.threadrun.yaml. Put it where the team agrees, for example .threadrun/factory.yaml, and commit it with the project.

Start from a recipe

  1. Open the repository in Threadrun, or clone it where the app can read the file.
  2. Open the factory page and press Open YAML, then choose the file from the checkout.
  3. A factory recipe loads into the factory editor: check the stages and the project, then press Run factory. A thread recipe starts at once with the runner's policy and your own skills, MCP servers and accounts.

If the recipe names a GitHub address, the app selects a project for that address. If it does not, the project already selected in the app is used.

A thread recipe

version: 1
kind: thread
name: Fix the flaky checkout test
repo: https://github.com/acme/store
harness: opencode
prompt: Find the flaky checkout test, explain why it fails under load, and fix it with a regression test.
options:
  model: deepseek-v4.1-flash
  effort: medium

harness is one of opencode, claude-code, codex, gemini, pi, omp or vibe. options holds the agent's own option ids, as shown in the composer. An option the agent does not offer is left to the agent's default.

A factory recipe

version: 1
kind: factory
name: Ship a change
repo: https://github.com/acme/store
goal: Add a dark mode to the settings page, with a toggle and a test.
factory:
  name: Ship a change
  limits:
    max_agents: 8
    max_parallel: 4
    budget_usd: 5.0
    harnesses: []
    models: []
    approve_spawns: false
  stages:
    - name: plan
      harness: opencode
      instructions: Read the code and write a short plan with the files to change.
      after: []
      approval: false
      options: []
      spawn: false
    - name: build
      harness: codex
      instructions: Implement the plan and add the tests.
      after: [plan]
      approval: false
      options: []
      spawn: false
    - name: review
      harness: claude-code
      instructions: Review the change for correctness and missing tests. Do not edit files.
      after: [build]
      approval: true
      options: []
      spawn: false

A stage's after lists the stages whose commits it starts from. approval: true puts a gate before the stage starts. options is a list of [option, value] pairs. The limits apply to the whole run, including agents a stage spawns.

What a recipe does not carry

  • No credentials. Keys, GitHub logins and MCP secrets stay on the runner and in the app.
  • No skills or MCP servers. Those come from the local setup and each person's Skills & MCP

choices; the same recipe can therefore run with a team's own kits.

  • No history, spend or audit. A recipe starts new work; the record of a run stays on the runner

that ran it.

  • No hidden trust. Opening a factory recipe loads the editor so a person can see the stages before

pressing Run. Opening a thread recipe starts it immediately, as if the prompt had been sent.

The file is ordinary YAML, so it can be reviewed in a pull request and changed without opening the app. The app writes it from the same fields it uses to run the work, so an exported recipe is valid input for another runner of the same version.