v1.1.11

Windows background service survives reboot in 1.1.11

May 2026 · Fix

npx -y @sharnix/agent@1.1.11

The problem

On some Windows accounts, Task Scheduler rejects ONLOGON task creation with "Access is denied." Sharnix fell back to an on-demand task with startOnLogin: false, so the tunnel agent did not come back after reboot or login — users had to run service start manually every session.

What we did

@sharnix/agent 1.1.11 keeps startOnLogin: true by registering a current-user Run key when ONLOGON is denied. The agent still runs as your user, reads the same ~/.sharnix profile, and survives terminal close. Reboot smoke test passed: service Running and relay connected without manual start.

What you can do now

Run npx @sharnix/agent@1.1.11 service install --force in your app directory to pick up the fix. After reboot, check service status — expect Login: starts at login (Run registry) and relay connected. Your dev server still needs its own start command for preview to return 200.

View technical details
  • Windows: when ONLOGON schtasks fails, Sharnix registers HKCU\...\Run\Sharnix-<project> instead of requiring manual service start after login.
  • startOnLogin stays true; service status shows starts at login (Run registry) when this path is active.
  • ONLOGON via Task Scheduler still preferred when the OS allows it (loginMethod: schtasks).
  • Reboot smoke test passed on Windows 11: agent auto-started, relay connected, no manual service start.
  • Same two-layer model: Sharnix keeps the tunnel agent running; your dev server (npm run dev, etc.) is still separate.
  • Upgrade path: npx @sharnix/agent@1.1.11 service install --force from your project directory.

← All releases