Skip to content

fix(web): use prompt_async endpoint to avoid timeout over VPN/tunnel#12749

Merged
adamdotdevin merged 1 commit intoanomalyco:devfrom
eytans:fix/web-prompt-async
Feb 13, 2026
Merged

fix(web): use prompt_async endpoint to avoid timeout over VPN/tunnel#12749
adamdotdevin merged 1 commit intoanomalyco:devfrom
eytans:fix/web-prompt-async

Conversation

@eytans
Copy link
Contributor

@eytans eytans commented Feb 8, 2026

What does this PR do?

The web UI sends prompts via POST /session/{id}/message, which holds the HTTP connection open until the agent finishes. Over Tailscale/VPN, aggressive network stacks kill the idle connection before completion, showing "Failed to send prompt" even though the server received and processed it.

The fix switches to the existing POST /session/{id}/prompt_async endpoint which returns 204 immediately. Response data already arrives through the SSE event stream. One-word change in submit.ts: .prompt().promptAsync(). Parameters are identical and the return value was unused.

Includes an e2e regression test that blocks the sync endpoint and verifies the prompt still succeeds.

Closes #12453
Closes #12748

How did you verify your code works?

  • Reverted the fix, ran the new e2e test — it fails (sync endpoint blocked → "Failed to send prompt" toast)
  • Applied the fix, ran the test — it passes (prompt succeeds, agent responds via SSE)
  • Ran existing prompt.spec.ts — still passes, no regression
  • Typecheck passes

The web UI sent prompts via POST /session/{id}/message which holds the
connection open until the agent finishes. Over Tailscale/VPN the idle
connection gets killed, showing 'Failed to send prompt' even though the
server processed it fine.

Switch to the existing POST /session/{id}/prompt_async endpoint that
returns 204 immediately. Response data already arrives through SSE.

Closes anomalyco#12453
@eytans eytans requested a review from adamdotdevin as a code owner February 8, 2026 22:11
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@adamdotdevin adamdotdevin merged commit e242fe1 into anomalyco:dev Feb 13, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI timeout over tail scale Web UI: "Failed to send prompt" false alarm on mobile browsers — prompt succeeds but response stream breaks

2 participants