Skip to main content
Updated Nov 27, 2026

Cancel a monitor

Action type: actions/monitors/cancel.

Use this action to disarm an armed monitor the agent no longer needs — the "actually, forget it" case. The monitor moves to expired without firing: its wake is never posted, and its armed-cap slot frees immediately instead of waiting for the TTL.

There is no re-arm. To change what a monitor watches, cancel it and create a new one with Watch and wake the agent.

In the editor​

In the action picker it is under Monitors and notifications, as "Stop a monitor before it wakes the agent". In the flow, a step reads like: Cancel the monitor Step 1 · monitor id.

Under What it does:

  1. Which monitor: the monitor's id, what a "Watch and wake the agent" step gives back as its monitor id. Usually data from the flow (Data or Expression, with Insert data). A monitor that already woke the agent, or already ended, cannot be canceled: the step then fails.
  2. In which conversation (a closed section, open when it holds something): Conversation. Empty means the conversation this run is in; a run with none, like a workflow's, needs one here. The monitor must be one that wakes this conversation, or the step fails.

Later steps can read:

  • Monitor (monitorId): The id of the monitor that was cancelled.
  • Monitor state (monitorState): The monitor's state after the cancel: expired.
  • Succeeded: Yes when this step did not fail.

Every step also has This step runs, If this step fails, the run, Edit as fields, View as JSON and Done: see The step editor.

Earlier names: Cancel monitor, Cancel a watch.

Fields​

The step's own fields, behind Edit as fields and in the API and MCP:

FieldWhat it does
monitorIdCEL resolving to the _id of the armed monitor — the monitorId a Watch and wake the agent step returned (e.g. workflow.step(0).monitorId), or one read from the read-only monitors data type
conversationIdThe conversation the monitor wakes. Defaults to the conversation the run is in — a workflow run has no conversation, so workflow steps must set it. It must match the monitor's own

What later steps can use​

  • workflow.step(N).monitorId — the canceled monitor's id
  • workflow.step(N).monitorState — expired after a successful cancel

(As with Watch and wake the agent, read the result via these outputs, not workflow.step(N).status — status is reserved for HTTP status codes.)

Scope: your conversation's monitors only​

A cancel is refused unless the monitor belongs to your account and wakes the conversation the cancel is scoped to. To cancel a monitor wired to a different conversation, pass that conversation's id explicitly. The account is the hard boundary here; the conversation check protects against mistakes (disarming another conversation's monitor by accident), not against a caller that deliberately names the right conversation.

When the cancel is refused​

ErrorMeaning
monitor_invalid_idmonitorId is not a valid monitor id
monitor_missing_conversationNo conversation to scope the cancel to — workflow runs must pass one
monitor_not_foundNo monitor with that id on this account
monitor_not_in_conversationThe monitor wakes a different conversation — pass its conversationId
monitor_not_armedAlready fired, expired or error — nothing to cancel. If it fired, the wake message is already in the conversation
monitor_being_evaluatedThe sweeper is evaluating the monitor at this instant — retry shortly (an evaluation lease lasts at most 2 minutes; 3 for agent_tool monitors)

Races, honestly​

A monitor that fires while you cancel stays fired — the cancel answers monitor_not_armed, and the wake is already in the conversation. A monitor mid-evaluation refuses the cancel (monitor_being_evaluated) rather than racing it — the sweeper re-confirms its claim at the last instant before sending, so canceling never un-posts a wake and a canceled monitor never fires afterwards. One narrow residual is worth knowing: if a worker crashes after delivering a wake but before recording the fire, the row briefly reads as armed again and a cancel can win it — you would then hold a delivered wake for a monitor that reads as canceled. That takes a crash at exactly the wrong instant, and the wake itself is deduplicated regardless.