openclaw - 💡(How to fix) Fix [Bug]: VS Code ACP prompts hang with OpenClaw on Windows after `sendPrompt`** [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#57348Fetched 2026-04-08 01:50:47
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

OpenClaw connects and initializes normally as a VS Code ACP agent on Windows, but ACP prompts hang indefinitely after sendPrompt instead of returning a response.

Error Message

VS Code ACP output:

[time] SessionManager: connecting to agent "OpenClaw" [time] Spawning agent "OpenClaw": npx openclaw acp [time] ConnectionManager: initialized. Agent: openclaw-acp v2026.3.28 [time] Connected to agent OpenClaw, session <redacted-session-id> [time] sendPrompt: session=<redacted-session-id>, text="hello..."

OpenClaw logs:

warn agent/embedded {"subsystem":"agent/embedded"} [ws-stream] WebSocket connect failed for session=<redacted-session-id>; falling back to HTTP. error=Error: Unexpected server response: 500

error Error handling request { method: 'session/prompt', params: { sessionId: '<redacted-session-id>' } } { code: -32603, message: 'Internal error', data: { details: 'Gateway disconnected: 1006: ' } }

error Error: connect ECONNREFUSED 127.0.0.1:18789

Additional evidence:

  • The same hanging behavior also occurs in openclaw acp client.
  • The VS Code ACP Client extension works with GitHub Copilot on the same machine, suggesting the ACP client itself is functioning and the issue is specific to OpenClaw as the ACP backend.
  • Possible related issue: https://github.com/openclaw/openclaw/issues/55523

Root Cause

Affects at least this Windows OpenClaw setup when used as an ACP agent from the VS Code ACP Client extension, and the same behavior is also reproduced with openclaw acp client. Severity is workflow-blocking for ACP use, because prompts can be submitted but do not return responses. Frequency appears intermittent-to-frequent based on observed testing: at least one prompt returned a reply once, but many subsequent prompts hung indefinitely. Practical consequence is that OpenClaw cannot be used reliably as a VS Code ACP chat agent in this environment, requiring cancellations, reconnects, and fallback to other agents such as GitHub Copilot.

Code Example

VS Code ACP output:

[time] SessionManager: connecting to agent "OpenClaw"
[time] Spawning agent "OpenClaw": npx openclaw acp
[time] ConnectionManager: initialized. Agent: openclaw-acp v2026.3.28
[time] Connected to agent OpenClaw, session <redacted-session-id>
[time] sendPrompt: session=<redacted-session-id>, text="hello..."

OpenClaw logs:

warn agent/embedded {"subsystem":"agent/embedded"} [ws-stream] WebSocket connect failed for session=<redacted-session-id>; falling back to HTTP. error=Error: Unexpected server response: 500

error Error handling request { method: 'session/prompt', params: { sessionId: '<redacted-session-id>' } } { code: -32603, message: 'Internal error', data: { details: 'Gateway disconnected: 1006: ' } }

error Error: connect ECONNREFUSED 127.0.0.1:18789

Additional evidence:
- The same hanging behavior also occurs in `openclaw acp client`.
- The VS Code ACP Client extension works with GitHub Copilot on the same machine, suggesting the ACP client itself is functioning and the issue is specific to OpenClaw as the ACP backend.
- Possible related issue: https://github.com/openclaw/openclaw/issues/55523
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

OpenClaw connects and initializes normally as a VS Code ACP agent on Windows, but ACP prompts hang indefinitely after sendPrompt instead of returning a response.

Steps to reproduce

Run OpenClaw on Windows with the default available model openai-codex/gpt-5.4. Open VS Code and use the ACP Client extension. Select OpenClaw as the ACP agent. Send a simple prompt such as Reply with exactly: ACP OK. Observe that the prompt hangs indefinitely after being submitted. Repeat the test with openclaw acp client in a terminal and observe the same hanging behavior.

Expected behavior

The ACP prompt should return a normal assistant response instead of hanging.

Actual behavior

After OpenClaw is selected as the ACP agent and a prompt is sent, the prompt remains stuck with no response in the VS Code ACP Client panel. The VS Code ACP output shows session initialization succeeds and logs sendPrompt, but no completion arrives. The same hanging behavior occurs in openclaw acp client. OpenClaw logs show repeated WebSocket connect failed ... Unexpected server response: 500, plus Gateway disconnected: 1006 and connect ECONNREFUSED 127.0.0.1:18789.

OpenClaw version

2026.3.28

Operating system

Windows 11

Install method

pnpm

Model

openai-codex/gpt-5.4

Provider / routing chain

Provider / routing chain * Effective request path through gateways, proxies, providers, or model routers.

Additional provider/model setup details

OpenClaw is using the default main agent, and openclaw agents list reports its model as openai-codex/gpt-5.4. openclaw models list shows this is the only available model, so no alternate model/provider was selected in the ACP client. The VS Code ACP Client extension successfully spawns npx openclaw acp, initializes sessions, and sends prompts, so the failure appears after prompt submission rather than during agent startup or ACP session creation.

Logs, screenshots, and evidence

VS Code ACP output:

[time] SessionManager: connecting to agent "OpenClaw"
[time] Spawning agent "OpenClaw": npx openclaw acp
[time] ConnectionManager: initialized. Agent: openclaw-acp v2026.3.28
[time] Connected to agent OpenClaw, session <redacted-session-id>
[time] sendPrompt: session=<redacted-session-id>, text="hello..."

OpenClaw logs:

warn agent/embedded {"subsystem":"agent/embedded"} [ws-stream] WebSocket connect failed for session=<redacted-session-id>; falling back to HTTP. error=Error: Unexpected server response: 500

error Error handling request { method: 'session/prompt', params: { sessionId: '<redacted-session-id>' } } { code: -32603, message: 'Internal error', data: { details: 'Gateway disconnected: 1006: ' } }

error Error: connect ECONNREFUSED 127.0.0.1:18789

Additional evidence:
- The same hanging behavior also occurs in `openclaw acp client`.
- The VS Code ACP Client extension works with GitHub Copilot on the same machine, suggesting the ACP client itself is functioning and the issue is specific to OpenClaw as the ACP backend.
- Possible related issue: https://github.com/openclaw/openclaw/issues/55523

Impact and severity

Affects at least this Windows OpenClaw setup when used as an ACP agent from the VS Code ACP Client extension, and the same behavior is also reproduced with openclaw acp client. Severity is workflow-blocking for ACP use, because prompts can be submitted but do not return responses. Frequency appears intermittent-to-frequent based on observed testing: at least one prompt returned a reply once, but many subsequent prompts hung indefinitely. Practical consequence is that OpenClaw cannot be used reliably as a VS Code ACP chat agent in this environment, requiring cancellations, reconnects, and fallback to other agents such as GitHub Copilot.

Additional information

I did not verify a last known good OpenClaw version for this exact workflow, so regression bounds are unknown. openclaw status and openclaw gateway status indicated the gateway was healthy during troubleshooting, and the ACP Client extension successfully initialized OpenClaw sessions before prompts hung. The only available model in this setup is openai-codex/gpt-5.4, so I could not test whether the issue reproduces with a different model/provider path. A possibly related public issue is #55523, which reports openai-codex websocket failures with HTTP fallback, although that report says requests still succeed after fallback while this case hangs.

On a second Windows 11 PC with what appears to be the same OpenClaw setup, ACP fails differently: every message returns: "ACP error (ACP_SESSION_INIT_FAILED): ACP metadata is missing for agent:main:acp:<redacted-session-id>. Recreate this ACP session with /acp spawn and rebind the thread. next: If this session is stale, recreate it with /acp spawn and rebind the thread."

I have not confirmed whether that is the same root cause or a separate ACP session-state issue, but it may be related.

extent analysis

Fix Plan

To resolve the issue of OpenClaw hanging indefinitely after sending a prompt as a VS Code ACP agent, follow these steps:

  1. Check WebSocket Connection: Ensure that the WebSocket connection is stable and not being refused. This can be done by checking the OpenClaw logs for any errors related to WebSocket connections.
  2. Update OpenClaw Version: Try updating OpenClaw to the latest version to ensure that any known issues have been resolved.
  3. Verify Model Configuration: Confirm that the model configuration is correct and that the openai-codex/gpt-5.4 model is properly set up.
  4. Disable HTTP Fallback: Temporarily disable the HTTP fallback to see if it resolves the issue. This can be done by setting the HTTP_FALLBACK environment variable to false.
  5. Check Gateway Status: Verify that the gateway status is healthy using the openclaw gateway status command.

Example Code Changes: To disable HTTP fallback, you can add the following code to your OpenClaw configuration file:

// config.js
module.exports = {
  // ... other configurations ...
  httpFallback: false,
};

Alternatively, you can set the HTTP_FALLBACK environment variable to false using the following command:

export HTTP_FALLBACK=false

Temporary Workaround: If the issue persists, try using a different model or provider to see if the issue is specific to the openai-codex/gpt-5.4 model.

Verification

To verify that the fix worked, send a prompt using the VS Code ACP Client extension and check if the response is received successfully. You can also check the OpenClaw logs for any errors related to WebSocket connections or HTTP fallback.

Extra Tips

  • Ensure that the OpenClaw version is up-to-date and that any known issues have been resolved.
  • Verify that the model configuration is correct and that the gateway status is healthy.
  • If the issue persists, try using a different model or provider to isolate the issue.
  • Refer to the OpenClaw documentation and GitHub issues for any known issues or workarounds related to WebSocket connections and HTTP fallback.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The ACP prompt should return a normal assistant response instead of hanging.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING