NEWAI chat: ask your fleet anything, in plain language. Chat with your fleet Read more →

How to monitor a robot policy (RL or VLA) in production

What to record on every inference of an RL or VLA policy in production, which health checks catch silent failures, and why each one matters.

Illustration for "Monitor a robot policy in production": a robot arm, a camera, with the label "inputs outside training range"

A robot running a learned policy can fail without a single error line.

The process is up. CPU and memory are normal. The model returns an action every 33 ms. And the robot is picking the wrong item, or reaching two centimeters short, or pausing for a second in the middle of every move. Nothing crashed, so nothing alerted.

These machines used to run programs: same input, same output, and when they broke, they broke loudly. Now they run models that make decisions many times a second from what they see. The model changes with every release, the world around the robot changes every day, and the robot is in a warehouse far from the people who trained it. Monitoring has to follow. Watching the process is not enough. You have to watch the decisions.

This post is the practical version: what to record on every inference, which checks catch the failures I have seen most, what thresholds to start with, and how much code it takes.

The short answer: Record every inference: which model and version, how long it took, a summary of the inputs and outputs, and whether the cycle succeeded. Then run a few checks on the robot that each map to a real failure: inputs outside the training range, saturated or NaN actions, a dark or frozen camera, the robot stopping while the model computes, and a slow remote model server. Use fixed thresholds only for safety checks and per-robot baselines for the rest.

Three layers, and the one most teams miss

I think about policy monitoring in three layers:

  1. Is it running? Process alive, restarts, crashes, GPU memory, which model and version are loaded. Most teams have this.
  2. Is each decision sane? Inputs look like what the model was trained on, outputs are finite and in range, timing holds. Almost nobody has this.
  3. Is the job getting done? Picks succeeded, cycles passed, episode returns. Some teams have this, usually as a daily report.

Layer 1 tells you about crashes. Layer 3 tells you something got worse, a day late, with no idea why. Layer 2 is where you learn why, and usually before the yield numbers move. That's where this post spends most of its time.

What to record on every inference

Record these on every inference. Most are small numbers. None of them should be full images.

  • Identity. Policy name, checkpoint version or file hash, which program and which device. When two robots disagree, the first question is always "are they even running the same thing?"
  • Timing. Total inference time, and the split: preprocessing, forward pass, postprocessing. If the model runs on a remote server, split round-trip time into server time and network time. Those two have completely different fixes.
  • Input summary. Shape of each camera input, a cheap brightness value per camera, a cheap "did this frame change" value (difference from the previous frame, or a small hash), the full state vector (joint positions are a few floats), and the task prompt for language-conditioned models.
  • Output summary. The action or action chunk, min and max per dimension, a count of NaN and Inf values, and the jump between the end of the last chunk and the start of this one.
  • Loop context. Achieved control-loop rate, and whether the robot was moving or waiting while the model computed.
  • Outcome markers. Episode or cycle start, end, success, and which step failed. These cost almost nothing and they are what connects layer 2 to layer 3.

Keep the per-inference record in a local ring buffer at full rate. Send aggregates (per-minute percentiles, counts) upstream normally. Send the raw window, with camera frames, only when something happens. That is the job of a flight recorder, and it keeps a cellular-connected robot within its data plan.

The health checks, and why each one matters

Raw numbers are useless at 2 a.m. What you want is a short list of checks that each map to a real failure and a real fix. Here are the ones I'd put on every policy.

Inputs outside the training range

What: the state vector (joint positions, gripper width, base velocity) goes outside the range the model saw in training.

Why it matters: this is the classic calibration failure. Someone replaces a servo and the joint offset shifts by a few degrees. A camera mount gets bent. The policy never saw those values, so its output is a guess, and it guesses confidently.

How: when you train, save per-dimension percentiles of the training inputs alongside the checkpoint (they are tiny). In production, flag a dimension that stays beyond, say, the 0.5th or 99.5th percentile for more than a few seconds. Require it to be sustained: one frame out of range during a fast move is noise. If you don't have training stats, use the policy's own first hours on that robot as the reference and flag drift away from it.

Saturated actions

What: an action dimension sits at its limit for many consecutive steps. For tanh-output policies, values pinned near plus or minus 1.

Why it matters: a saturated policy is asking for more than the robot can give. It is usually pushing against something (a jammed part, a wall, a joint limit) or it is lost and outputting extremes. Either way, the commands are no longer smooth control.

How: count the share of steps in a window where any dimension is within a few percent of its bound. A few percent of steps is normal on aggressive moves. A quarter of steps for ten seconds is not.

NaN and Inf actions

What: any non-finite value in the output.

Why it matters: this one has zero tolerance. A NaN sent to a motor controller does whatever that controller does with garbage. Usual causes: a corrupted or half-written weight file, a division by zero in normalization, fp16 overflow after moving to a different GPU.

How: check every output before it leaves your code. On a NaN, do not send it. Hold the last good command or stop, raise an event immediately, and keep the input that caused it. This check belongs in the control path, not only in monitoring.

Dark or frozen camera

What: a camera input goes dark (mean brightness near zero), or stops changing while the robot is moving.

Why it matters: frozen is worse than dark. A dark frame is obviously wrong. A frozen frame looks perfectly normal; it is just the frame from 40 seconds ago, repeated because a USB camera dropped and the driver kept returning its last buffer. The policy keeps acting on a world that no longer exists.

How: brightness under a threshold for a few seconds is dark. Frame-to-frame difference at (or very near) zero for more than a second while the joints are moving is frozen. Use the "while moving" part, or a robot waiting at an empty station will trigger it all night.

The robot stops while the model computes

What: the robot finishes executing an action chunk and then waits, motionless, for the next one.

Why it matters: with synchronous chunked inference, the robot runs 50 actions, asks the model, and stands still until the answer comes back. On a fast GPU you never notice. On a slower one, or with a remote model, the robot stutters every second and a half. Cycle time goes up and nobody knows why.

How: measure the gap between the last executed action of one chunk and the first of the next. Report how often it happens and how long the robot stood still. The fix is usually asynchronous inference: start computing the next chunk before the current one runs out.

Chunk seams

What: a large jump between the last action of one chunk and the first action of the next.

Why it matters: each chunk is planned from a slightly different observation, so their ends don't always line up. The result is a jerk at every seam. It wears hardware, it can drop parts, and on an arm near people it is the kind of motion that makes operators nervous.

How: compare the seam jump with the typical step-to-step change inside a chunk. A seam that is several times larger than the usual step, on a regular basis, needs smoothing or blending between chunks.

Slow or failing remote model server

What: for policies served from a GPU box on the network or from the cloud, inference time goes up, or calls fail or time out.

Why it matters: "the model is slow" can mean three things. The server is overloaded. The network got worse (the Wi-Fi access point at the end of the aisle). Or the robot is starving the request because its own process is busy. You need to know which one before you buy a bigger GPU.

How: record round-trip time and server-reported compute time separately. If round trip rises and server time doesn't, it's the network. If both rise, it's the server. Track failure and timeout rates as their own numbers.

RL return drop and task success

What: episode return, episode length or success rate falls compared with the policy's own recent history.

Why it matters: this is layer 3, and for RL policies the return is the most honest signal you have. But it is slow and noisy, so it tells you that something changed. The checks above usually tell you why.

How: compare a rolling window (an hour, a shift) with the same robot's baseline, ideally for the same hour of day. Alert on a drop that holds for a full window, not on single bad episodes.

Low confidence (for vision classifiers)

What: the top-class probability falls, or entropy rises, for a perception model in the pipeline.

Why it matters: confidence is a noisy signal, but a shift in it means the images changed. Save the frames the model was unsure about. They are exactly the images you want in the next training set.

Output never changes

What: the policy returns the same action regardless of input.

Why it matters: this happens when the input pipeline is broken upstream (all zeros, a stale buffer) or the model was loaded wrong. It looks healthy on every system metric.

Thresholds: start simple, then baseline

Static thresholds on model metrics are a trap. Inference time on a Jetson in a hot enclosure in August is not the same as in March. A robot on the night shift sees different light. Two robots with different cameras have different "normal".

My advice:

  • Fixed thresholds only for physics and safety: NaN (zero), saturation, a frozen camera while moving, a state outside known joint limits.
  • Per-robot baselines for everything else: latency, loop rate, seam size, confidence, return. Learn the normal range per robot, per hour of day, and flag sustained departures.
  • Compare with peers: if one robot's latency is 2x the other eight running the same checkpoint, the problem is that robot. More on this in finding the robot that's different.
  • Require duration: almost every check should need a few seconds to a few minutes of sustained signal. Policies are noisy. Pages that fire on one frame get muted within a week.

What to alert on, and what to only record

Alert on things a person should act on now: NaN actions, a dark or frozen camera, the remote server failing, a sustained drop in task success. Everything else goes into a per-policy health summary someone checks daily, and into the incident recording when something does happen.

The best format I've found is one sentence per policy: which robot, which policy, what is wrong, the evidence. "arm-07: the policy is not doing well because the robot stops for about 4 seconds every 60 steps while the model computes." An engineer can act on that sentence. A dashboard with 40 charts makes them go looking.

Zero code vs instrumenting the app

How much code should this take? Less than people expect.

  • Zero code (outside the process): a good agent can see which model processes run (PyTorch, ONNX Runtime, TensorRT, JAX), which checkpoints they loaded, which port a policy server listens on, GPU memory, restarts and crashes. That covers layer 1 with no change to your app.
  • Run the app under a wrapper: for Python, a launcher can hook common frameworks at import time and trace each inference: timing, input shapes, actions, NaNs, the loop rate. No edits to your code.
  • One import: wrapping your policy object explicitly and marking episodes in code gives you exact boundaries and outcomes. If you do one thing in code, mark episodes. Outcomes are the hardest signal to infer from outside.
  • Other languages: send small JSON datagrams to a local agent. Keep it fire-and-forget so monitoring can never block the control loop.

Whatever you use, monitoring must never slow the loop or raise into it. Measure its overhead once, on your real hardware.

How we do it at PhysicalFleet

PhysicalFleet discovers models on the robot with no code: PyTorch, ONNX, TensorRT and JAX processes, openpi π0/π0.5, OpenVLA, LeRobot policies, Stable-Baselines3, the checkpoint each one loaded and its GPU memory. Run your app with pf run --name picker -- python3 app.py, or import physicalfleet, and every inference is traced, with the health checks above judged on the robot and summarized as one sentence per policy. When something goes wrong, the last minutes are saved as an MCAP recording you can replay. More on the observability page.

Once you can see the policy clearly, the next places to look are the loop around it (control-loop latency and jitter) and the test before it ever acts (shadow mode).

If you're running policies on real robots, tell me which failure took you the longest to find. I'm collecting them.

Common questions

How do I detect a frozen camera on a robot?

Compare each frame with the previous one, using a simple difference or a small hash. If the difference stays at or near zero for more than a second while the joints are moving, the camera is probably frozen, often a USB camera whose driver keeps returning its last buffer. Tie the check to motion, or a robot waiting at an empty station will trigger it all night.

What causes NaN actions in a robot policy?

The usual causes are a corrupted or half-written weights file, a division by zero in normalization, and fp16 overflow after moving to a different GPU. Check every output before it leaves your code. On a NaN, don't send it: hold the last good command or stop, raise an event right away, and keep the input that caused it.

How do I know if my robot's inputs are outside its training data?

Save per-dimension percentiles of the training inputs next to the checkpoint, and in production flag a dimension that stays beyond roughly the 0.5th or 99.5th percentile for more than a few seconds. Requiring it to be sustained filters out single frames during fast moves. This often catches calibration problems, like a replaced servo that shifted a joint offset by a few degrees.

What should I alert on for a robot policy in production?

Alert on things someone should act on now: NaN actions, a dark or frozen camera, a failing remote model server and a sustained drop in task success. Put everything else in a per-policy health summary someone reads daily. Use fixed thresholds only for safety checks, per-robot baselines for the rest, and require a sustained signal before anything fires.

Why does my robot stop between action chunks?

With synchronous chunked inference, the robot executes a chunk, asks the model for the next one and stands still until it arrives. On a fast GPU you don't notice, but on slower hardware or with a remote model the robot stutters at every chunk. The usual fix is asynchronous inference: start computing the next chunk before the current one runs out.

#policy monitoring#VLA#reinforcement learning#robot observability#model monitoring#physical AI
Amit EzerCo-founder, PhysicalFleet

From the lab bench. To the entire fleet.

Connect your first machine in minutes, develop it in the lab and run your whole fleet in production from one place.

Free for up to 3 machines · Then pay as you go