> For the complete documentation index, see [llms.txt](https://docs.chirpwireless.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chirpwireless.io/rules-engine/reference/fixing-builds-and-runtime-stops.md). Agents can also search and read this documentation through its [MCP server](https://docs.chirpwireless.io/~gitbook/mcp).

# Fixing Builds and Runtime Stops

Decode build errors, understand deploy and stop, and recover an automation that the system force-stopped.

When you click **Build**, Chirp validates your entire automation before creating a deployable artifact. If something is wrong, the build fails and shows error messages. This page explains what those errors mean and how to fix them, along with how deployment works and what to do when the system force-stops an automation.

***

## What are common build errors?

Build errors appear after you click Build. Each error describes the problem the validator found. Fix the issues and build again.

### Missing Start Event

**What it looks like:** `expected exactly 1 message startEvent, got 0`

**What it means:** The build did not find a valid Start Event in the automation. Every automation needs exactly one Start Event on the canvas.

**How to fix:** Make sure a Start Event is present on the canvas. If you accidentally deleted it, drag a new one from the palette.

### No End Event

**What it looks like:** `expected at least 1 endEvent`

**What it means:** Your automation has no End Event. Every path must eventually reach an End Event so the automation knows when a run is finished.

**How to fix:** Drag an End Event from the palette onto the canvas. Connect the last node in each path to an End Event.

### Gateway flow without a condition

**What it looks like:** `outgoing flow "Flow_2" of gateway "Gateway_1" must have conditionExpression`

**What it means:** An Exclusive Gateway has an outgoing connection that is not the default flow and does not have a CEL condition. Every non-default flow needs a condition so the gateway knows when to follow it.

**How to fix:** Click the Exclusive Gateway and find the flow without a condition in the properties sidebar. Either add a CEL condition (e.g., `vars.value > 30`) or click **Set as default** if this should be the fallback path. Only one flow can be the default.

### Default flow has a condition

**What it looks like:** `default flow "Flow_3" of gateway "Gateway_1" must not have conditionExpression`

**What it means:** The default flow should not have a condition — it runs when all other conditions are false. A condition on the default flow would be confusing and is not allowed.

**How to fix:** Either remove the condition from the default flow, or change the default to a different flow.

### CEL syntax error

**What it looks like:** `ERROR: <input>:1:15: Syntax error` or a message pointing to a specific position in your expression.

**What it means:** A CEL expression somewhere in your automation has a typo or invalid syntax. Gateway conditions, Script Task scripts, Motivation Messages, and Input/Output expressions are all checked at build time.

**How to fix:** Find the node with the error (the message often includes the node or flow ID). Open its properties and check the CEL expression for typos. Common mistakes: missing quotes around strings, using `=` instead of `==`, or forgetting `string()` when concatenating a number with text. See [CEL for Home Automations](https://docs.chirpwireless.io/rules-engine/reference/cel-for-home-automations.md) for syntax help.

### Gateway condition does not return true/false

**What it looks like:** A build error referencing a gateway condition that does not evaluate to a boolean.

**What it means:** Gateway conditions must return `true` or `false`. If your expression returns a number, string, or other type, the build rejects it.

**How to fix:** Rewrite the condition as a comparison. For example, change `vars.value` to `vars.value > 30`.

### Duplicate node IDs

**What it looks like:** `duplicate id "Task_1" (scriptTask and scriptTask)`

**What it means:** Two nodes on your canvas have the same internal ID. This is rare and usually caused by copy-paste issues.

**How to fix:** Delete one of the duplicate nodes and re-create it from the palette.

### Invalid Boundary Error Event attachment

**What it looks like:** `boundaryEvent "Boundary_1" attachedToRef "Gateway_1" is not a task`

**What it means:** A Boundary Error Event can only attach to task nodes — Script Task, Set Alarm, or Enrichment. You cannot attach it to a gateway, Start Event, or End Event.

**How to fix:** Detach the Boundary Error Event and reattach it to a valid task node.

### Boundary Error Event flow target

**What it looks like:** `boundaryEvent "Boundary_1" outgoing must target a task or endEvent`

**What it means:** A Boundary Error Event's outgoing connection must lead to a task node (Script Task, Set Alarm, Enrichment) or an End Event. It cannot connect directly to a gateway or Start Event.

**How to fix:** Reconnect the Boundary Error Event's outgoing flow to a valid target — usually a Set Alarm (to notify about the error) or an End Event (to stop gracefully).

***

## How do I fix trigger setup problems?

### "I created a trigger, but nothing happens"

A saved trigger only monitors its condition. It does not contain an alert, command, or other response, and Chirp does not attach it to an automation automatically.

1. Return to the **Rules** tab and create or edit the automation that should respond.
2. Select the Start Event, use its pencil to open the properties, and choose **Trigger condition** as the Start source.
3. Select the saved trigger and select **Save** at the bottom of the Start Event panel.
4. Add the response nodes, then save the automation from the editor toolbar.
5. Build the automation and deploy its artifact from the **Artifacts** tab.

See [From a trigger to a running automation](https://docs.chirpwireless.io/rules-engine/triggers.md#from-a-trigger-to-a-running-automation) for the complete workflow.

### "My trigger is missing from the Start Event"

The **Trigger condition** selector appears only when the Start source is set to **Trigger condition**. It lists saved triggers for the current organization and currently loads only the first page.

* Confirm the trigger was created in the same organization as the automation.
* Confirm **Trigger condition** is selected as the Start source.
* If the trigger exists beyond the first page, it cannot yet be selected from this field.

***

## How do I deploy and redeploy an automation?

### How deployment works

When you click **Deploy** on an artifact in the Artifacts tab, that build becomes the live version of your automation. It begins waiting for the sensor reading or saved trigger selected in its Start Event.

Only one build per automation can be running at a time. If you deploy a new build while another one is already running, the platform automatically stops the old one and starts the new one in a single operation. You do not have to stop the running artifact yourself; the platform takes care of the switch.

### Stopping an automation

Click **Stop** on a running artifact to pause it. Sensors continue reporting and triggers continue monitoring, but the automation no longer starts from either source.

Stopping is for deliberate pauses — when you want to temporarily disable an automation without deleting it. To bring it back later, click **Deploy** again.

### Redeploying after changes

When you edit an automation that already has a running artifact:

1. Make your changes in the editor and save.
2. Build a new artifact — this does not affect the currently running one.
3. Deploy the new artifact — the platform replaces the running one automatically.

***

## How do Force Stop and recovery work?

### What Force Stop means

Chirp monitors the health of every running automation. If an automation encounters repeated errors over a sustained period, the system automatically stops it to prevent cascading problems in your home setup. The artifact status changes to **Force Stopped** (red).

This is a safety measure — it protects your home from an automation that might fire incorrect alarms, miss important readings, or produce confusing results due to an underlying problem.

### Common causes

* **Deleted alarm definition** — The automation tries to fire an alarm that no longer exists on the Alarm page.
* **Removed sensor** — The Start Event references a sensor that has been deleted from your device.
* **Enrichment sensor offline** — An Enrichment node tries to fetch data from a sensor that is no longer reporting, and no Boundary Error Event is attached to handle the failure.
* **CEL runtime error** — An expression fails at runtime due to unexpected data shapes (e.g., trying to access a field that does not exist without a `has()` check).
* **Dead-end node** — A node other than an End Event has no outgoing connection. The automation reaches that point at runtime and has nowhere to go, causing a repeated error.

### Recovery steps

1. **Review the automation** — Open the editor and check each node's configuration. Look for references to deleted sensors, devices, or alarm definitions.
2. **Check that your sensors are active** — Make sure the devices referenced in the Start Event and any Enrichment nodes are online and reporting data.
3. **Verify CEL expressions** — Ensure expressions handle edge cases. Use `has()` before accessing variables that might not exist.
4. **Consider adding Boundary Error Events** — Attach them to Enrichment and Script Task nodes so failures route to a fallback path instead of crashing the automation.
5. **Fix the issue, build a new artifact, and deploy** — Once the underlying problem is resolved, build and deploy again.

***

## What if a debug session is stuck?

### "I started debugging and nothing is happening"

That's how it's meant to work. A debug session opens your automation, puts the marker on the Start node and waits for you — it doesn't run anything on its own.

1. Look at the bottom of the canvas for the little toolbar. It sits on the diagram, not up in the top bar with Save and Build.
2. Press **Run (F10)** to go to the first breakpoint or the end, or **Step over (F9)** to move one node.
3. Check it's actually going: the Start node has a blue ring and your values are listed in the panel on the right.

See [Debugging Automations](https://docs.chirpwireless.io/rules-engine/reference/debugging-automations.md#why-does-nothing-happen-until-i-press-a-button).

### "A node has a red ring around it"

That's the node that just hit an error — not a breakpoint (a small dot on top) and not where you are (a blue ring). Start with the expression on it.

1. Open the node and read its expression.
2. Check every name in it is listed in the Variables tab. `vars.temperature` falls over if nothing called `temperature` was set at the start or made earlier on.
3. Check the `vars.` is there — `temperature > 25` isn't `vars.temperature > 25`.
4. Check a branch condition comes out as `true` or `false`.
5. Paste it into **Evaluate** on the Watch tab to try it out.

### "The automation didn't take any branch"

Two possibilities.

**A condition couldn't be worked out.** If one of them mentions something that isn't there, the gateway stops with an error and nothing further runs — it doesn't fall back to the default. You'll see the red ring; work through the steps above.

**Nothing matched and there's no default.** Every condition came out false and no branch is set as the fallback, so there's nowhere to go. Open the gateway, pick the branch that should catch everything else, and click **Set as default**.

### "The buttons have gone gray"

The Step buttons only work while things are paused — not while the automation is running, not while a Side Effect box is open, and not after an automation failed to load. Stop always works. If the automation didn't load, start a fresh session.

### "My breakpoints vanished"

Either you pressed **Run ignore breakpoints (F11)**, which turns them all off and leaves them off — switch them back on in the Breakpoints tab — or the editor reloaded, which clears them. A note tells you how many went.

### "The session ended while I was in the middle of something"

Sessions last 30 minutes from when they start, and stepping through doesn't extend that. You get a warning shortly before; start a fresh one to carry on.

***

## How does build-time CEL validation work?

CEL expressions are validated at build time — not just checked for syntax, but also analyzed for type correctness:

* **Gateway conditions** must compile to a boolean type. An expression that returns a number or string will fail the build.
* **All expressions** (scripts, conditions, motivation messages, inputs, outputs) must be syntactically valid CEL. Typos and invalid references are caught before you can deploy.
* **Type mismatches** in operators (e.g., comparing a string to a number) may be caught depending on what the compiler can determine statically.

This means that if your build succeeds, the basic structure and syntax of every expression in your automation has been validated. Runtime errors can still occur when actual sensor data arrives with unexpected shapes, but the most common mistakes are caught early.
