OpenClaw VS Code extension 0.2.1 does not work on Windows with acpx 0.12.0 and ChatGPT authentication
Summary
After installing the OpenClaw VS Code extension and configuring ChatGPT authentication through Codex, the chat panel did not work on Windows.
Sending a message caused the chat to remain indefinitely in the STOP state without returning a response.
The issue involved three separate compatibility problems between:
- Windows
openknot.openclaw-extension version 0.2.1
acpx version 0.12.0
- Codex authenticated through a ChatGPT account
After applying three local patches to the compiled extension code, the chat began working correctly and returned pong for a test prompt.
Environment
- OS: Windows 11 x64
- VS Code extension:
openknot.openclaw-extension@0.2.1
- OpenClaw CLI:
2026.7.1
- acpx:
0.12.0
- Authentication: ChatGPT account through Codex
- Workspace: local Windows development repository
The extension was installed under the standard VS Code extensions directory:
%USERPROFILE%\.vscode\extensions\openknot.openclaw-extension-0.2.1
The compiled extension file was:
%USERPROFILE%\.vscode\extensions\openknot.openclaw-extension-0.2.1\out\extension.js
Expected behavior
After installing the extension, installing acpx globally, authenticating Codex with ChatGPT, and sending a prompt such as:
the chat should return:
and complete normally.
Actual behavior
The OpenClaw chat panel remained indefinitely in the STOP state.
Initially, no visible error appeared in the chat panel.
The OpenClaw Agent output channel showed:
spawn acpx --format json --approve-reads exec ping
The process did not return a visible response.
Investigation
1. Direct Windows spawn of acpx failed
The extension originally used:
On Windows, acpx is installed through npm and exposed as:
A raw Node.js child process spawn could not resolve or execute it correctly.
Testing showed that:
failed with:
and Windows error code:
Changing it to:
allowed the process to be found, but direct execution was still unreliable.
A direct Node.js test using:
failed with:
Error: spawn EINVAL
errno: -4071
code: EINVAL
syscall: spawn
This indicates that directly spawning an npm .cmd wrapper on Windows is not reliable in this context.
Fix 1: execute acpx through cmd.exe
The extension spawn logic was changed from:
spawn("acpx", args, {
cwd,
env: { ...process.env },
stdio: ["ignore", "pipe", "pipe"]
});
to:
spawn(
process.env.ComSpec,
["/d", "/s", "/c", "acpx.cmd", ...args],
{
cwd,
env: { ...process.env },
stdio: ["ignore", "pipe", "pipe"]
}
);
After this change, the process started and exited normally.
The output then showed:
spawn acpx --format json --model gpt-5.5[medium] --approve-reads exec ping
acpx exited code=0
2. The default Codex model was not supported with ChatGPT authentication
Running the same command manually exposed the second issue:
acpx.cmd --format json --approve-reads exec ping
The ACP session selected:
The response contained:
{
"type": "invalid_request_error",
"message": "The 'gpt-5.3-codex' model is not supported when using Codex with a ChatGPT account."
}
The local Codex configuration already specified a different model, but acpx did not use it for the ACP session and instead selected its own default model.
Testing with an explicitly selected supported model worked:
acpx.cmd --model "gpt-5.5[medium]" --format json --approve-reads exec ping
This returned:
Fix 2: pass a supported model explicitly
The extension argument builder was changed from:
args.push("--format", "json");
to:
args.push(
"--format",
"json",
"--model",
"gpt-5.5[medium]"
);
This made the session use a model supported by ChatGPT authentication.
A better permanent solution would be to expose a model setting in the extension:
"openclaw.chat.model": {
"type": "string",
"default": "",
"description": "ACP model ID to use for chat sessions"
}
Suggested logic:
const model = config.get("chat.model", "");
if (model) {
args.push("--model", model);
}
The extension should not assume that the default Codex model is compatible with every authentication method.
3. The extension parser did not support the current acpx JSON-RPC response format
After fixing process execution and model selection, acpx exited successfully with code 0, but no response appeared in the chat panel.
Manual command output showed that acpx 0.12.0 returns assistant text through JSON-RPC notifications in this format:
{
"jsonrpc": "2.0",
"method": "session/update",
"params": {
"sessionId": "<redacted>",
"update": {
"sessionUpdate": "agent_message_chunk",
"content": {
"type": "text",
"text": "pong"
}
}
}
}
The extension parser expected event types at the top level:
It did not unwrap:
and did not recognize:
As a result, the valid response was silently ignored.
Fix 3: support session/update and agent_message_chunk
The parser was changed from:
mapJsonEvent(event) {
let type = event.type;
to equivalent logic:
mapJsonEvent(event) {
if (
event?.method === "session/update" &&
event.params?.update
) {
event = event.params.update;
}
const type = event.sessionUpdate ?? event.type;
if (type === "agent_message_chunk") {
const text =
event.content?.text ??
event.content ??
"";
return text
? { type: "text", text }
: null;
}
After this patch, the chat correctly displayed:
Final working behavior
After applying all three fixes and restarting VS Code:
spawn acpx --format json --model gpt-5.5[medium] --approve-reads exec ping
acpx exited code=0
The chat panel displayed:
and the task completed normally.
Required fixes
1. Windows process invocation
On Windows, do not directly spawn npm .cmd wrappers.
Use:
spawn(
process.env.ComSpec,
["/d", "/s", "/c", "acpx.cmd", ...args],
options
);
or another properly tested equivalent with safe argument escaping.
Using cmd.exe explicitly is more deterministic than relying on Node.js to resolve .cmd wrappers.
2. Configurable ACP model
The extension should allow the ACP model to be configured.
Suggested setting:
"openclaw.chat.model": {
"type": "string",
"default": "",
"description": "Model ID passed to acpx through --model"
}
Suggested logic:
const model = config.get("chat.model", "");
if (model) {
args.push("--model", model);
}
The extension should not assume that the default Codex model is compatible with every authentication method.
3. Current acpx JSON-RPC support
The parser should support JSON-RPC notifications from acpx 0.12.0, especially:
session/update
agent_message_chunk
usage_update
available_commands_update
At minimum, the extension should unwrap:
and map:
to a visible text event.
4. Better error reporting
The extension should surface nested agent errors such as:
{
"sessionUpdate": "agent_message_chunk",
"content": {
"type": "text",
"text": "{\"type\":\"error\", ...}"
}
}
Currently, such errors can be silently ignored or rendered as normal assistant text.
A failed model selection should be shown clearly in the chat panel instead of leaving the task indefinitely in the STOP state.
Additional observation
The extension creates two separate output channels:
The actual chat process logs are written to:
This is not obvious during troubleshooting.
It may be useful to document this or consolidate the output channels.
Workaround
The local workaround was applied directly to:
%USERPROFILE%\.vscode\extensions\openknot.openclaw-extension-0.2.1\out\extension.js
This is only temporary.
Any extension update or reinstall will overwrite the modifications.
Conclusion
The default extension did not work with the following setup:
Windows
VS Code extension 0.2.1
acpx 0.12.0
Codex authenticated through ChatGPT
The failure was caused by three independent compatibility issues:
- incorrect execution of the Windows npm
.cmd wrapper;
- unsupported default model selection for ChatGPT authentication;
- outdated parsing of the current acpx JSON-RPC event format.
After fixing all three areas, the OpenClaw chat worked correctly.
OpenClaw VS Code extension 0.2.1 does not work on Windows with acpx 0.12.0 and ChatGPT authentication
Summary
After installing the OpenClaw VS Code extension and configuring ChatGPT authentication through Codex, the chat panel did not work on Windows.
Sending a message caused the chat to remain indefinitely in the
STOPstate without returning a response.The issue involved three separate compatibility problems between:
openknot.openclaw-extensionversion0.2.1acpxversion0.12.0After applying three local patches to the compiled extension code, the chat began working correctly and returned
pongfor a test prompt.Environment
openknot.openclaw-extension@0.2.12026.7.10.12.0The extension was installed under the standard VS Code extensions directory:
The compiled extension file was:
Expected behavior
After installing the extension, installing
acpxglobally, authenticating Codex with ChatGPT, and sending a prompt such as:the chat should return:
and complete normally.
Actual behavior
The OpenClaw chat panel remained indefinitely in the
STOPstate.Initially, no visible error appeared in the chat panel.
The
OpenClaw Agentoutput channel showed:The process did not return a visible response.
Investigation
1. Direct Windows spawn of
acpxfailedThe extension originally used:
On Windows,
acpxis installed through npm and exposed as:A raw Node.js child process spawn could not resolve or execute it correctly.
Testing showed that:
failed with:
and Windows error code:
Changing it to:
allowed the process to be found, but direct execution was still unreliable.
A direct Node.js test using:
failed with:
This indicates that directly spawning an npm
.cmdwrapper on Windows is not reliable in this context.Fix 1: execute acpx through cmd.exe
The extension spawn logic was changed from:
to:
After this change, the process started and exited normally.
The output then showed:
2. The default Codex model was not supported with ChatGPT authentication
Running the same command manually exposed the second issue:
The ACP session selected:
The response contained:
{ "type": "invalid_request_error", "message": "The 'gpt-5.3-codex' model is not supported when using Codex with a ChatGPT account." }The local Codex configuration already specified a different model, but
acpxdid not use it for the ACP session and instead selected its own default model.Testing with an explicitly selected supported model worked:
This returned:
Fix 2: pass a supported model explicitly
The extension argument builder was changed from:
to:
This made the session use a model supported by ChatGPT authentication.
A better permanent solution would be to expose a model setting in the extension:
Suggested logic:
The extension should not assume that the default Codex model is compatible with every authentication method.
3. The extension parser did not support the current acpx JSON-RPC response format
After fixing process execution and model selection,
acpxexited successfully with code0, but no response appeared in the chat panel.Manual command output showed that
acpx 0.12.0returns assistant text through JSON-RPC notifications in this format:{ "jsonrpc": "2.0", "method": "session/update", "params": { "sessionId": "<redacted>", "update": { "sessionUpdate": "agent_message_chunk", "content": { "type": "text", "text": "pong" } } } }The extension parser expected event types at the top level:
It did not unwrap:
and did not recognize:
As a result, the valid response was silently ignored.
Fix 3: support session/update and agent_message_chunk
The parser was changed from:
to equivalent logic:
After this patch, the chat correctly displayed:
Final working behavior
After applying all three fixes and restarting VS Code:
The chat panel displayed:
and the task completed normally.
Required fixes
1. Windows process invocation
On Windows, do not directly spawn npm
.cmdwrappers.Use:
or another properly tested equivalent with safe argument escaping.
Using
cmd.exeexplicitly is more deterministic than relying on Node.js to resolve.cmdwrappers.2. Configurable ACP model
The extension should allow the ACP model to be configured.
Suggested setting:
Suggested logic:
The extension should not assume that the default Codex model is compatible with every authentication method.
3. Current acpx JSON-RPC support
The parser should support JSON-RPC notifications from
acpx 0.12.0, especially:At minimum, the extension should unwrap:
and map:
to a visible text event.
4. Better error reporting
The extension should surface nested agent errors such as:
{ "sessionUpdate": "agent_message_chunk", "content": { "type": "text", "text": "{\"type\":\"error\", ...}" } }Currently, such errors can be silently ignored or rendered as normal assistant text.
A failed model selection should be shown clearly in the chat panel instead of leaving the task indefinitely in the
STOPstate.Additional observation
The extension creates two separate output channels:
The actual chat process logs are written to:
This is not obvious during troubleshooting.
It may be useful to document this or consolidate the output channels.
Workaround
The local workaround was applied directly to:
This is only temporary.
Any extension update or reinstall will overwrite the modifications.
Conclusion
The default extension did not work with the following setup:
The failure was caused by three independent compatibility issues:
.cmdwrapper;After fixing all three areas, the OpenClaw chat worked correctly.