Wait for job
wait_for_jobWait for an action job to reach a decision or a final state: approved and executed, rejected, failed, or execution_unknown. A job still awaiting owner approval when the timeout elapses is returned as awaiting_approval; call again to keep waiting. Keep timeout_seconds below your client's tool timeout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | Job identifier returned by run_action. | |
| timeout_seconds | No | How long to wait for a decision or final state before returning the current job; keep it below your client's tool timeout. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Job identifier. | |
| error | Yes | Failure, execution_unknown or queued approval revocation explanation; null otherwise. | |
| input | Yes | Validated action input exactly as submitted. | |
| action | Yes | Catalog action name, for example integration.execute. | |
| output | Yes | For writes awaiting_approval or queued: the exact approval preview bound to the owner's decision. Rejected writes retain that preview, including after a queued approval is revoked. After succeeded: the action result. After execution_unknown: the approved write plus the ambiguous provider response when one was received. Other jobs may have a preserved preview or null. | |
| status | Yes | awaiting_approval, queued, and running are non-terminal; succeeded, failed, rejected, and execution_unknown are terminal. An owner may revoke a queued approval, producing rejected with both approval and rejection evidence. | |
| createdAt | Yes | Creation time. | |
| updatedAt | Yes | Last status change. | |
| approvedAt | Yes | ||
| approvedBy | Yes | Owner who approved the write. | |
| rejectedAt | Yes | ||
| rejectedBy | Yes | Owner who rejected the write. | |
| sideEffect | Yes | True when the action writes to an external system and therefore required owner approval. | |
| workflowId | Yes | Caller-supplied workflow identifier shared across related jobs. | |
| workspaceId | Yes | Workspace that owns the job. | |
| workflowName | Yes | Caller-supplied workflow name shown in the dashboard. | |
| idempotencyKey | Yes | Idempotency key that deduplicates this submission within the workspace. |