Skip to navigation

Check the prediction after you ship

After you ship a change from a simulation brief, tag your production traces with the brief’s change ID and read the report’s predictions array. Runtype compares production runs before and after the change and reports whether the simulation’s prediction held up and whether production improved.

Before you begin

You need the following before you check a prediction:

  • A change brief exported from a proposal run, with its changeId. For export steps, see Export the change brief.
  • Your updated agent deployed in production, sending OpenTelemetry traces to the OpenTelemetry Protocol (OTLP) traces endpoint with your product’s ingest key (RUNTYPE_INGEST_KEY) and the same agent name that the simulation ran on.
  • The Runtype Connect MCP server added to your coding agent, or the runtype-connect CLI signed in on your computer.

Tag production traces with the change ID

To match production runs to a saved prediction, set runtype.change.id and deployment.environment.name as OpenTelemetry resource attributes where your agent runs in production:

Tag production traces
OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=production,runtype.change.id=YOUR_CHANGE_ID

Replace YOUR_CHANGE_ID with the changeId value from your exported change brief. If your traces already set deployment.environment.name, keep its value if it’s production or prod.

Runtype matches a trace to a prediction only when all of the following conditions hold:

  • Change ID: runtype.change.id matches the brief’s changeId exactly.
  • Environment: deployment.environment.name is production or prod, compared without case.
  • Endpoint and key: traces arrive at the OTLP traces endpoint with your product’s ingest key and the same agent name that the simulation ran on.
  • Timestamp: your agent sends the traces after you exported the brief. Runtype allows for up to a day of clock difference.

Runtype compares each change ID on its own. When you ship another change, update runtype.change.id to that brief’s changeId.

For every resource and span attribute that Runtype reads, see Trace attributes.

Read the prediction comparison

To inspect the predictions array, read the report on the baseline run or a proposal run.

Choose how to read the report:

Ask your coding agent to call the get_report tool for your product or run:

get_report arguments
{
"productId": "YOUR_PRODUCT_ID"
}

Replace YOUR_PRODUCT_ID with your connected product ID. To read a specific baseline or proposal run instead, pass runId in place of productId.

The report shows up to two of your exported briefs. Read it on the baseline run or a proposal run, not on a run against your real agent.

Check status and timing

Runtype marks a prediction as shipped on the first qualifying production trace. It computes the comparison after 20 distinct production conversations carry runtype.change.id.

The following table describes each status value in a prediction entry:

StatusWhen it appearsWhat the entry contains
not_shippedBefore the first tagged trace arrives.No tagged conversations have arrived.
collectingAfter one to 19 tagged conversations arrive.How many tagged conversations have arrived, out of 20.
comparedAfter 20 or more distinct tagged conversations arrive.The before-and-after comparison.

Runtype compares tagged production runs from up to 14 days after you ship against untagged runs from a matching period before you shipped. The pre-change period is at least one day and at most 14 days. Each side uses up to 500 runs. On a busy agent, sentence says when some runs were left out.

Read the verdict and metrics

After status becomes compared, verdict separates whether the simulation’s prediction held up from whether production improved.

The verdict.verdict field reports whether production moved in the direction that the simulation predicted:

  • held_up: production moved in the predicted direction.
  • did_not_hold_up: production moved against the prediction, or moved when the simulation predicted no change.
  • too_close_to_call: the difference is within chance.
  • cant_tell_yet: built-in signals scored fewer than 20 conversations on either side, or the simulation predicted no direction.

The verdict.production field reports whether production improved after the change. The verdict.label field names the action that follows verdict.production, not verdict.verdict. The following table maps each verdict.production value to its label and meaning:

verdict.productionverdict.labelMeaning
betterKeep the changeFewer conversations had a detected failure, or the failure rate held steady and your yes-or-no signals improved.
worseReview the changeMore conversations had a detected failure, or the failure rate held steady and your yes-or-no signals got worse.
mixedReview the changeFailures fell, but errors or a custom signal got worse.
no_clear_changeToo close to callNo measure moved beyond chance.
unknownCan't tell yetBuilt-in signals scored fewer than 20 conversations on at least one side.

The metrics array lists up to six measures in order:

  1. conversations_without_detected_problem (“Conversations without a detected failure”), based on built-in failure signals. Other signals, such as frustration and cost or latency outliers, appear separately and don’t count as failures.
  2. runs_ended_in_error (“Runs that ended in an error”), the share of ended runs whose status is error.
  3. Up to four of your signals.

Each metric shows the before and after rates, the change, and the direction that the simulation predicted. A metric marked fewMeasurements rests on fewer than 20 measurements, so read it as a hint.

A custom yes-or-no signal tied to your confirmed success or failure criteria can count toward verdict.production. It must measure at least 20 conversations on each side with the same settings and question. If its settings or question changed during either comparison period, Runtype lists it without counting it, and note says why.

Troubleshoot missing predictions

If predictions is empty or stays before compared, check the following causes:

  • Prediction not saved on export: if export_change_brief returned predictionNotRecorded: true, export the same brief again so Runtype saves it.
  • Temporary read error: if predictionsUnavailable is true, Runtype couldn’t read prediction data on that request and returned an empty predictions array. Call get_report again later.
  • More than two exported briefs: each report lists at most two briefs, with shipped briefs first and then newest first.
  • Stuck in not_shipped: check every tagging condition in Tag production traces with the change ID.
  • Stuck in collecting: wait until 20 distinct production conversations carry runtype.change.id. On a busy agent, keep the change ID on every production trace so recent runs are tagged.
  • Compared with unknown outcome: built-in signals scored fewer than 20 conversations on at least one side. Confirm that pre-change production runs existed in the comparison window, signal scoring finished, and your monthly signal measurement allowance isn’t used up. For plan limits, see Limits and pricing.

Act when production disagrees

Act on verdict.production and verdict.label before verdict.verdict:

  • Keep the change (better): keep the change in production, even when verdict.verdict is did_not_hold_up.
  • Too close to call (no_clear_change): wait for more production conversations within the 14-day window and check the report again.
  • Review the change (worse or mixed): investigate before keeping the change in production.

To investigate a regression, a mixed result, or an unexpected outcome, follow these steps:

  1. Read sentence and metrics in the prediction entry to see which measure moved: built-in failure signals, runs_ended_in_error, or a custom signal.
  2. Call query_traces with environment set to the environment value your production traces send, such as "production", and from set to shippedAt. Inspect sample failing runs with read_trace. For steps, see Read traces and runs.
  3. Call get_agent_profile to check whether production prompts, tools, or models drifted from what the simulation tested. For details, see Read the observed profile.
  4. Check signal firing rates with get_signals. For steps, see Score conversations with signals.
  5. Check the baseline report’s confidence and replayAgreement. If the simulation copy of your agent was directional, test your next change against your real agent before you ship it. For steps, see Test against your real agent.
  6. Revert or revise the change in your codebase. When you ship a follow-up change from another brief, update runtype.change.id to that brief’s changeId.

Next steps

Continue with one of these pages: