Skip to content

Fix unlimited timeout handling in Windows Node - #396

Merged
yikkuro (yikkuro) merged 2 commits into
mainfrom
sunt-microsoft-fix-node-exec-timeout-null
Nov 18, 2026
Merged

yikkuro (yikkuro) merged 2 commits into
mainfrom
sunt-microsoft-fix-node-exec-timeout-null

Conversation

@yikkuro

@yikkuro yikkuro (yikkuro) commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Fix Windows Node execution when OpenClaw sends timeoutMs: null for an explicitly unlimited command timeout. Previously this caused an exception instead of running the command.

Related Issue

N/A

Changes

  • Treat null and zero as no execution deadline; preserve the default for an omitted timeout, clamp positive values and reject malformed values.
  • Omit the unsupported null field from internal consent requests while preserving the original timeout for execution.
  • Run unlimited MXC commands through the existing sandbox executor without its deadline while retaining cancellation, policy checks, output limits and process cleanup.
  • Add parser, approval, host execution, and isolated fake and native MXC timeout/cancellation regression tests.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • CI/CD or build configuration change
  • Refactoring (no functional changes)

Testing

  • Tests pass locally (cd desktop && npm run test)
  • Renderer tests pass locally (cd desktop/renderer && npm run test)
  • Build succeeds (cd desktop && npm run build)
  • Manual testing performed (describe below)
  • dotnet test windows-node-host.Tests/MicroClaw.WindowsNodeHost.Tests.csproj -c Release --no-restore -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false -p:UseSharedCompilation=false -m:1 --verbosity quiet: passed (224 passed, 10 skipped, 0 failed; native test is opt-in and skipped in this run).
  • With MICROCLAW_MXC_NATIVE_TEST_SCRATCH set to an isolated session directory, dotnet test windows-node-host.Tests/MicroClaw.WindowsNodeHost.Tests.csproj -c Release --no-restore -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false -p:UseSharedCompilation=false -m:1 --filter FullyQualifiedName~NativeNoTimeoutCommandCompletesAndCancellationSettlesProcess --verbosity quiet: passed (1 native MXC test, 0 skipped, 0 failed). It verifies that a contained no-timeout command completes beyond the configured deadline and that caller cancellation settles a second process.
  • dotnet build windows-node-host/MicroClaw.WindowsNodeHost.csproj -c Release --no-restore -p:ImportDirectoryBuildProps=false -p:ImportDirectoryBuildTargets=false -p:UseSharedCompilation=false -m:1 --verbosity quiet: passed (0 errors, before the test-only follow-up).
  • Tests and build reported NU1900 because the NuGet vulnerability service was unreachable; the native test build also reported existing xUnit1051 warnings in unchanged MxcSdkNativeTests.cs.
  • Desktop and renderer checks listed above were not run because this change targets the Windows Node host; no manual desktop smoke test was performed.

Checklist

  • My code follows the coding guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes

Tao Sun and others added 2 commits November 18, 2026 12:37
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@yikkuro
yikkuro (yikkuro) merged commit f7210ac into main Nov 18, 2026
4 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.

1 participant