Skip to main content
Blocks until an agent reaches a target phase, a terminal phase, or comes to rest awaiting input, then prints a one-line outcome and the agent’s status. Useful in scripts and CI pipelines that need to act on agent completion. The wait ends when the first of these happens:
  • the agent enters the --phase target (if one was given),
  • the agent enters a terminal phase (PHASE_COMPLETED, PHASE_FAILED, PHASE_CANCELED),
  • the agent comes to rest in PHASE_TASK_COMPLETE, PHASE_IDLE, or PHASE_SLEEPING with no queued follow-ups. A resting agent cannot move again without input. A sleeping agent never completes on its own, so waiting longer cannot satisfy the request. Check the printed phase: “at rest” means the agent is awaiting follow-ups, not finished.
The command is interruptible: press Ctrl-C to stop waiting.

Synopsis

On a VM, the path is optional. If you omit it, the command waits on the current agent itself.

Arguments

Valid phases

If the agent reaches a terminal phase, or comes to rest, before the target phase, the command returns immediately with the current status. A target-phase wait never blocks on an agent that cannot reach the target on its own.

Output

The command prints a one-line outcome (wait ended: …) followed by the same status output as murmur status: workflow ID, phase, VM assignment, progress, output, and cost. On timeout, it prints only the status, without the outcome line. With --json, it prints only the AgentStatus as JSON.

Examples

Wait for an agent to finish its work

Wait for an agent to start running

Wait in a script

Waiting on an agent that went to sleep

Under the default on_idle: sleep policy an agent parks its VM after the idle timeout and never reaches PHASE_COMPLETED by itself. The command returns the resting status instead of blocking forever, and exits non-zero because the target phase was not reached: send a follow-up with murmur queue add or kill the agent to drive it terminal.

Agent fails before reaching target phase

The command returns because PHASE_FAILED is terminal. It does not block forever waiting for PHASE_IDLE.

Errors