Skip to main content
POST
Force Kill Work Order

Force Kill Work Order

Forcefully terminates a work order’s agent process. This is more aggressive than Cancel and should be used when graceful shutdown is not working.
Force kill sends SIGKILL to the agent process, which may result in lost work. Use Cancel for graceful shutdown when possible.

Request

id
string
required
The work order ID to force kill (e.g., wo_abc123)
gracePeriodMs
number
default:"5000"
Milliseconds to wait for graceful shutdown before SIGKILL (0-30000)
immediate
boolean
default:"false"
If true, skip grace period and send SIGKILL immediately
reason
string
Optional reason for force kill (logged for audit)

Immediate Kill

Response

success
boolean
required
Indicates if the request was successful
data
object
required
Force kill result

Example Responses

Graceful Termination

Forced Kill (SIGKILL)

Already Terminated

Error Responses

Work Order Not Found

Kill Behavior

Difference from Cancel

Use force kill when:
  • The agent is stuck in an infinite loop
  • Cancel has been attempted but the process won’t stop
  • Emergency shutdown is required
  • Resources need to be freed immediately