Use prompt_async (not /message) for idle-worker continue to avoid blocking
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user