-
Notifications
You must be signed in to change notification settings - Fork 4
Packaged gateway fails to start: suspected agent-user execute permission issue with Koffi native dependency #77
Copy link
Copy link
Open
Labels
P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.Emergency: data loss, security bypass, crash loop, or unusable core runtime.bugSomething isn't workingSomething isn't workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:crash-loopThis issue is about crashes, hangs, restart loops, or process-level availability.This issue is about crashes, hangs, restart loops, or process-level availability.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.A non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Activity
Metadata
Metadata
Assignees
Labels
P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.Emergency: data loss, security bypass, crash loop, or unusable core runtime.bugSomething isn't workingSomething isn't workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:crash-loopThis issue is about crashes, hangs, restart loops, or process-level availability.This issue is about crashes, hangs, restart loops, or process-level availability.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.A non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Summary
The packaged OpenClaw gateway fails to start inside its isolated agent session with a reported Koffi module-loading / "module not found" error. Anna and Linus both reproduced the failure after updating the bundled OpenClaw version.
Primary hypothesis: the isolated agent user's security context can read the packaged JavaScript but lacks the permissions required to load/execute Koffi's native binaries, or a native library they depend on, from the installed MSIX package.
This is a suspected cause, not yet confirmed. A module-loading error alone does not distinguish denied access from a missing binary, a missing dependent DLL, or an architecture mismatch.
Affected scenario
3a9d69db306cd7f081e06254cb89c4bcc14a7107.3.1.6is declared as a direct runtime dependency in that release and in v2026.8.1/v2026.8.2. It was first reported to ship as a direct dependency in stable v2026.8.1.Reproduction
On an affected Windows machine:
clawctl setupto provision the isolated agent session and runtime.clawctl gateway-service start.Expected: the gateway starts under the isolated agent user and can load its required native dependencies without weakening session isolation.
Actual: gateway startup fails while loading Koffi. The exact failing binary path and underlying Windows loader error still need to be captured.
Investigation needed
Any fix should preserve isolation and avoid broadly granting write or execute access without identifying the specific blocked resource.
Current direction
Investigate and implement a real, isolation-preserving fix for native dependency loading in the packaged gateway, rather than work around the failure by packaging an older Koffi-free OpenClaw release.
Continue the investigation and repair work Anna put together in #75, which stages native-bearing dependency packages in the isolated agent's LocalState and redirects native package resolution. Treat that PR as a repair candidate to review and refine, not as an already accepted or fully validated fix.
Before resolving this issue, confirm the underlying loader/access failure and validate the resulting fix in installed packages, including fresh installs, state-preserving in-place upgrades, and both x64 and ARM64. Preserve the isolated-session boundary and the immutable packaged application outside the narrowly scoped native-dependency staging.
The compatibility-build draft #76 has been closed. Its results remain useful diagnostic history, but the downgrade/older-release direction is not being pursued as the fix. Keep this issue open until installed gateway recovery is demonstrated.
Compatibility experiment (closed)
A compatibility build packages OpenClaw v2026.7.33, commit
b60a4e9fa97cddf1869a1866d879b3051783cf12, while retaining the current launcher and isolated-session changes. Its dependency manifest/lockfile and generated packages contain no Koffi dependency.Simply reverting the previous upstream pin would select v2026.8.2, which still declares Koffi; that is not a Koffi-free comparison.