Summary
On a packaged Windows installation, I traced repeated native-command failures inside a local-agent session to the environment passed from the daemon into the agent process.
The affected runtime environment contained:
instead of a normal Windows executable-extension list.
That value propagated into the agent and its nested shell/tool processes.
Under the affected environment, otherwise-normal native commands intermittently lost stdout/stderr or failed with the Windows status:
2147942632
0x800700e8
ERROR_NO_DATA
Normalizing PATHEXT before spawning the agent eliminated the failures in controlled tests.
The issue was reproduced and locally fixed on packaged 0.17.0.
I also checked 0.19.0; this specific agent-runtime PATHEXT normalization is still not present there.
Environment
- Windows 11
- packaged desktop build
- reproduced on 0.17.0
- checked against 0.19.0
- local CLI agent runtime
- failure occurs in child/nested native-command execution
No user-specific paths are required to reproduce the condition.
Root-cause evidence
The environment inherited by the daemon/agent contained:
The problematic value was preserved into nested agent commands.
A controlled runtime patch normalized PATHEXT on Windows only when the inherited value did not contain .EXE.
Conceptually:
if (process.platform === "win32") {
const key =
Object.keys(env).find(
(name) => name.toLowerCase() === "pathext",
) ?? "PATHEXT";
const current =
typeof env[key] === "string"
? env[key]
: "";
if (!/\.exe/i.test(current)) {
env[key] =
".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC";
}
}
This is included to describe the verified mitigation, not to prescribe the exact implementation.
Verification after normalization
The patched runtime passed:
cmd echo ×3
node --version ×3
python --version ×3
- additional Node/Python one-shot commands
- failure → next-command recovery
- real cancellation / SIGTERM
- command after cancellation
- long no-output command followed by recovery
- 20 sequential command executions
- additional read-only smoke runs
The previous 0x800700e8 / missing-output behavior did not recur.
Expected behavior
Local-agent sessions launched from the packaged Windows application should receive a usable Windows executable environment even if the desktop launcher inherited a damaged or unusually narrow PATHEXT.
At minimum, .EXE should remain resolvable for nested native commands.
Related work
There is a related open PR, #6049, which improves Windows .cmd / .bat executable resolution when PATHEXT is stripped or narrowed.
This report is slightly different:
#6049:
host-side executable resolution
this issue:
the PATHEXT value propagated into the spawned agent runtime
and then into nested shell/native commands
The two fixes may be complementary.
Suggested regression test
Add a Windows runtime-env test equivalent to:
const env = createAgentRuntimeEnv(
{
PATH: "...",
PATHEXT: ".CPL",
},
daemonUrl,
token,
nodeBin,
);
expect(
Object.entries(env)
.find(([key]) => key.toLowerCase() === "pathext")
?.[1],
).toMatch(/\.EXE/i);
The exact normalization policy is up to the maintainers.
Summary
On a packaged Windows installation, I traced repeated native-command failures inside a local-agent session to the environment passed from the daemon into the agent process.
The affected runtime environment contained:
instead of a normal Windows executable-extension list.
That value propagated into the agent and its nested shell/tool processes.
Under the affected environment, otherwise-normal native commands intermittently lost stdout/stderr or failed with the Windows status:
Normalizing
PATHEXTbefore spawning the agent eliminated the failures in controlled tests.The issue was reproduced and locally fixed on packaged 0.17.0.
I also checked 0.19.0; this specific agent-runtime
PATHEXTnormalization is still not present there.Environment
No user-specific paths are required to reproduce the condition.
Root-cause evidence
The environment inherited by the daemon/agent contained:
The problematic value was preserved into nested agent commands.
A controlled runtime patch normalized
PATHEXTon Windows only when the inherited value did not contain.EXE.Conceptually:
This is included to describe the verified mitigation, not to prescribe the exact implementation.
Verification after normalization
The patched runtime passed:
cmdecho ×3node --version×3python --version×3The previous
0x800700e8/ missing-output behavior did not recur.Expected behavior
Local-agent sessions launched from the packaged Windows application should receive a usable Windows executable environment even if the desktop launcher inherited a damaged or unusually narrow
PATHEXT.At minimum,
.EXEshould remain resolvable for nested native commands.Related work
There is a related open PR,
#6049, which improves Windows.cmd/.batexecutable resolution whenPATHEXTis stripped or narrowed.This report is slightly different:
The two fixes may be complementary.
Suggested regression test
Add a Windows runtime-env test equivalent to:
The exact normalization policy is up to the maintainers.