agentd: validate webhook URL before spawning agent

t-563·WorkTask·
·
·
·Omni/Agent.hs
Created1 week ago·Updatedyesterday

Description

Edit

When spawning an agent via the API, a relative webhook URL like '/webhook' is accepted but later causes 'InvalidUrlException "/webhook" "Invalid URL"'. Validate that the webhook field is a full URL (http/https) at spawn time and return a 400 error if it's not. This prevents confusing errors later in the agent lifecycle.

Timeline (4)

🔄[human]Open → InProgressyesterday
🔄[human]InProgress → Reviewyesterday
💬[human]yesterday

Fixed in b697c45: validateWebhookUrl checks http(s):// prefix. spawnHandler returns 400 for invalid URLs. spawnPiAgent also validates and records failure.