diff --git a/scripts/opencode-builder.sh b/scripts/opencode-builder.sh index f7d549de7..ff1c42af7 100755 --- a/scripts/opencode-builder.sh +++ b/scripts/opencode-builder.sh @@ -251,8 +251,11 @@ send_message_capture() { local body="$2" local out_file="$3" + # Use prompt_async — fire-and-forget; server returns 204 immediately. + # The synchronous /message endpoint would block until the agent finishes + # its full response (potentially many minutes for a busy worker). ( trap '' INT - exec curl -sf -X POST "${BASE}/session/${sid}/message" \ + exec curl -sf -X POST "${BASE}/session/${sid}/prompt_async" \ -H "Content-Type: application/json" \ -d "$body" \ -w "\n"