await_command
Poll a shell command periodically until it exits successfully (code 0), enabling waits for long-running operations like builds and deployments.
Instructions
Block agent execution until a shell command exits with code 0 (success). The command is polled at regular intervals. The agent is stuck on this call until done.
Exit code convention:
Exit 0: condition met → return success
Exit 2: condition failed → return failure
Any other code: still running → keep polling
Use this to wait for long-running operations: cloud builds, CI/CD, deployments, etc. Example: await_command(command="curl -sf https://ci.example.com/build/123/status | grep -q done", interval_seconds=30)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Shell command to check periodically. Exit 0 = success, exit 2 = failure, other = still running. | |
| timeout_seconds | No | Max wait time in seconds. Default 3600 (1 hour). | |
| interval_seconds | No | Seconds between checks. Default 30. |