Skip to content

HooksInput ​

Type: object additionalProperties: false

FieldRequiredTypeDescription and constraints
after_createNostringExecutable script text with a shebang; runs once after workspace creation.
before_runNostringExecutable script text with a shebang; runs before every assignment.
after_runNostringExecutable script text with a shebang; runs after confirmed agent completion, before sandbox pause or deletion.
before_removeNostringAccepted by the API but never executed, including before automatic sandbox deletion. Do not use for cleanup.
timeout_secondsNointegerTimeout for each hook invocation. default: 300
minimum: 1
maximum: 2147483647

JSON Schema ​

json
{
  "additionalProperties": false,
  "properties": {
    "after_create": {
      "description": "Executable script text with a shebang; runs once after workspace creation.",
      "type": "string"
    },
    "before_run": {
      "description": "Executable script text with a shebang; runs before every assignment.",
      "type": "string"
    },
    "after_run": {
      "description": "Executable script text with a shebang; runs after confirmed agent completion, before sandbox pause or deletion.",
      "type": "string"
    },
    "before_remove": {
      "description": "Reserved for future use; never called, including before automatic sandbox deletion.",
      "type": "string"
    },
    "timeout_seconds": {
      "description": "Timeout for each hook invocation.",
      "type": "integer",
      "default": 300,
      "minimum": 1,
      "maximum": 2147483647
    }
  },
  "type": "object"
}

All schemas · HTTP API