Skip to content

fix(windows): find the host's scheduled task without administrator rights - #539

Merged
andrebrait merged 1 commit into
mainfrom
fix/windows-svchost-supervisor
Nov 19, 2026
Merged

andrebrait merged 1 commit into
mainfrom
fix/windows-svchost-supervisor

Conversation

@andrebrait

@andrebrait andrebrait commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #537.

On a Windows install without administrator rights, Win32_Process returns an empty ExecutablePath for SYSTEM processes such as svchost.exe. inspectWindowsSupervisor skipped Task Scheduler's svchost by its path only, so it kept that pid, matched the Schedule service to it and took the service, not the omp-web-host scheduled task, as the daemon's supervisor. The update then failed with not_controllable (access denied on Schedule).

  • Windows process rows now carry the process Name, which is readable for every process.
  • supervisorCandidatePids drops service hosts by name as well as by path.
  • A test runs on every platform with non-administrator rows (empty paths for SYSTEM processes).

Not changed: the WMI launch fallback in the issue's secondary note. The reporter traced that failure to their security product, and Win32_Process.Create already reports a non-zero ReturnValue.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where in-app updates on Windows installations without administrator rights could fail to identify the service supervising the host daemon. Updates can now recognize the service when Windows identifies its process by name rather than executable path. This helps ensure the update process can locate the correct service in these installations.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Windows process inspection now records process names and excludes svchost.exe ancestors by name or executable path when selecting supervisor candidates. The added test covers empty executable paths and case-insensitive name matching. The changelog describes the non-administrator update failure.

Changes: Windows supervisor detection

Layer / File(s) Summary
Process name data
lib/upgrade-process.ts
ProcessInfo gains an optional process name. Windows process enumeration queries and returns Win32_Process.Name with the existing process fields.
Supervisor candidate filtering
lib/upgrade-process.ts, lib/upgrade-process.windows-service.test.mjs, CHANGELOG.md
The exported supervisorCandidatePids helper filters svchost.exe candidates by process name or executable path. The test covers missing paths and case-insensitive name matching. The changelog describes the Windows update issue.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

  • ompweb-dev/ompweb#538: Addresses the same Windows supervisor detection issue with an overlapping change to exclude service hosts by process name.
Merge Risk: Minimal · up to 27af6

This change makes in-app updates on non-administrator Windows installs identify the omp-web-host scheduled task instead of the Schedule service. The added test covers empty paths and case-insensitive name matching. No merge-blocking risk was found.

Security architecture risk: Minimal · up to 27af6

The fix recognizes shared Windows service hosts when their executable paths are unavailable. It preserves the existing permission, process-identity and supervisor-configuration checks. No introduced or worsened security or failure-containment risk was established.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the Windows fix and the scenario, but it says the fix finds "the host's scheduled task" when the changeset actually filters service-host processes (svchost.exe) by process name as well…
Linked Issues check Passed Issue #537 requires that the Windows supervisor inspection not resolve a task-scheduled daemon to the Schedule service when svchost.exe has an empty ExecutablePath. The head version of lib/upgra…
Out of Scope Changes check Passed All changed files relate to the #537 objective. lib/upgrade-process.ts adds the process name field and the name-aware supervisorCandidatePids helper used by Windows supervisor inspection. lib/upgrad…
Full details: Title check

Explanation

The title names the Windows fix and the scenario, but it says the fix finds "the host's scheduled task" when the changeset actually filters service-host processes (svchost.exe) by process name as well as path. The title is related to the main change and matches issue #537's expected behavior, so it is a partial but accurate match. It is not off-topic. The changelog entry and objectives describe the same Windows non-administrator supervisor detection fix.

Full details: Linked Issues check

Explanation

Issue #537 requires that the Windows supervisor inspection not resolve a task-scheduled daemon to the Schedule service when svchost.exe has an empty ExecutablePath. The head version of lib/upgrade-process.ts shows the Windows process query now returns Name = [string]$_.Name and maps it to ProcessInfo.name, so process names are available for every row. The PR summary states that the new exported supervisorCandidatePids drops service hosts by name as well as by path, that inspectWindowsSupervisor uses it, and that lib/upgrade-process.windows-service.test.mjs asserts exclusion of svchost.exe rows with empty paths on every platform. The issue's suggested fix matches this design. The secondary WMI launch fallback is explicitly not a claimed defect in #537, so it is not a requirement here. Limits: the two diff reads were unavailable and the file read was truncated before the supervisorCandidatePids body and its call site. The function body and test content are therefore assessed from the PR summary, not from source read at head.

Full details: Out of Scope Changes check

Explanation

All changed files relate to the #537 objective. lib/upgrade-process.ts adds the process name field and the name-aware supervisorCandidatePids helper used by Windows supervisor inspection. lib/upgrade-process.windows-service.test.mjs adds the regression test for empty-path svchost rows. CHANGELOG.md adds a Fixed entry for this change. No unrelated behavior change appears in the summary. The WMI launch fallback is not changed, which matches the PR description and the issue's non-defect note. Limit: the truncated read did not show the full changed hunks, so the absence of other edits rests on the PR summary.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2a6ab6e3-1ba0-4b99-ac27-0c5990698787
Commits

Reviewing files that changed from the base of the PR and between 8b8e2c1 and 27af65a.

Files selected for processing: 3

  • CHANGELOG.md
  • lib/upgrade-process.ts
  • lib/upgrade-process.windows-service.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@andrebrait

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-19T06:37:40.272798Z
We couldn’t complete this review. Comment @codex review to try again.
27af65a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@andrebrait
andrebrait merged commit 2176745 into main Nov 19, 2026
5 checks passed
@andrebrait
andrebrait deleted the fix/windows-svchost-supervisor branch November 19, 2026 06:40
@andrebrait andrebrait mentioned this pull request Nov 20, 2026
andrebrait added a commit that referenced this pull request Nov 20, 2026
Bumps the version to 0.7.4 and folds [Unreleased] into [v0.7.4]: in-app updates on a Windows install without administrator rights (#539) and a host leaving "omp not installed" once its runner is there (#542).
andrebrait added a commit to ompweb-dev/tau that referenced this pull request Nov 23, 2026
* fix(windows): let in-app updates replace an npm-global install

Port of ompweb-dev/ompweb#519.

* fix(windows): stop a failed host candidate that got the old daemon's pid

Port of ompweb-dev/ompweb#526.

* fix(outbox): prune delivered rows inside the add's write transaction

Port of ompweb-dev/ompweb#535.

* fix(windows): find the host's scheduled task without administrator rights

Port of ompweb-dev/ompweb#539.

* fix(updates): build the tray at release and resume host update downloads

Port of ompweb-dev/ompweb#532. The committed bin/tau-tray.exe was still the omp-web build; releases now build it from native/tray. The omp runner download resume does not apply: tau has no runner download.

* fix(hosts): report pi to the server once it answers after the daemon started

Port of ompweb-dev/ompweb#542. A daemon whose startup read found no pi reads the version again (30 s, doubling to 5 min) and sends a pi_version link message, so a host that gets pi after its daemon started comes online without a restart. The runner download retry does not apply: tau has no runner download.

* docs(agents): note the pi_version link message

* fix(chat): count only completed subagents in the subagents header

Port of ompweb-dev/ompweb#440.

* feat(chat): render svg code fences inline

Port of ompweb-dev/ompweb#455.

* fix(sidebar): mark a completed session seen once it is opened

Port of ompweb-dev/ompweb#336.

* fix(i18n): add the zh-TW completed-subagents summary

Port of ompweb-dev/ompweb#545.

* perf(sessions): strip unused assistant fields from the session response

Port of ompweb-dev/ompweb#454.

* feat(api): app-info handshake and a per-connection heartbeat

Port of ompweb-dev/ompweb#407.

* feat(directory-picker): add a Browse… button that opens the OS folder dialog

Port of ompweb-dev/ompweb#544.

* feat(sessions): navigation-only reads, context ETag and a prompt-less state

Port of ompweb-dev/ompweb#415. A rename now falls back to pi's session_info entry only when pi refused it or the child is gone.

* feat(notifications): answer a pending dialog from the notification

Port of ompweb-dev/ompweb#414, without omp's formDialog and session-move aliases.

* perf(events): hold tool snapshots to one frame per second

Port of ompweb-dev/ompweb#418.

* fix(ui): prevent file-panel tabs from clipping on overflow

Port of ompweb-dev/ompweb#547.

* fix(projects): keep a re-added workspace's display data and avoid worktree path collisions

Port of ompweb-dev/ompweb#554 (rework of ompweb-dev/ompweb#297).

* feat(composer): fullscreen edit mode and one-line collapse for long sent messages

Port of ompweb-dev/ompweb#556.

* docs(changelog): note the ports from ompweb

* chore: use tau names in the ported update and tray code

* fix(markdown): sanitize svg fences with an element allowlist

A tab inside the scheme (java&#9;script:), a prefixed xlink href, <set>/<animate> retargeting an href, and CDATA or processing instructions re-parsed as HTML on insertion all got past the blocklist sanitizer.

* fix(directory-picker): offer the folder dialog only to a page on this machine

Behind a reverse proxy on this machine every connection is loopback, so the page's own Origin (or same-origin Referer) must be loopback too. The picker can be closed while a dialog is pending, and the zenity check runs once.

* fix(composer): queue or steer from the full-screen editor during a run

Send and Ctrl+Enter called handleSend, which ignores a message while a run streams, so the editor closed and nothing was sent.

* fix(notifications): keep a shared child's dialogs announceable after this server leaves it

Leaving a host-owned child that keeps running retracted its pending dialogs permanently, so the next holder could not announce a question that was still waiting. They are now forgotten (a temporary retraction), as after a resync.

* docs(notifications): drop omp-only dialog kinds from the ported comments

* fix(dialogs): answer pi's dialogs under their own ids and show the ask tool's questions

The wrapper still accepted only omp's numeric dialog ids, so every answer to a pi dialog (UUID ids) failed with invalid_ui_response, from the web dialog and from a notification. The ask tool's payload ({questions: [{question, options: string[], multiSelect}]}) reached the dialog unconverted, which expects a question list with option objects; RpcProcess now converts it.

* fix(tray): read tau's settings and logs from ~/.pi/agent

The native tray still read ~/.omp/agent/web-service.json and its logs, so it ignored the saved port, hostname and mode. Releases now build this source (scripts/build-tray.sh).

* fix(hosts): never build the local link URL from an unbracketed IPv6 address

* test(notifications): name the registry-key answer test for what it checks

* test(hosts): give the fake children pi's string dialog ids

* fix(dialogs): keep host tool calls out of dialog answers, and settle a dead child's dialogs for good

A ui_response naming a pending host tool call is refused, so its bookkeeping sees the real host_tool_result. Dialogs are only forgotten when this server leaves a shared child that is still alive. The ask tool's questions get distinct ids, and pageIsLoopback sits above handle's doc comment.

* fix(events): stop releasing held tool snapshots once the sink falls behind

* fix(composer): paste images and leave IME keys alone in the full-screen editor

* fix(directory-picker): require Origin on a non-GET, and read the Windows chooser's path as UTF-8

* fix(worktrees): report an occupied fallback worktree directory as worktree_directory_exists

* fix(notifications): keep pushes within 3993 bytes, refuse expired dialogs and settled replays

* fix(updates): release only the stopped server's own processes and recheck each pid before stopping it

* docs(notifications): name the /api/events notifications channel

* fix(updates): release every install locker after the server stops again

Scoping that release to the stopped trees missed their children on Linux and macOS, where a dead parent's children are re-parented, so the leftover check refused the update.

* fix(notifications): keep the question in a push that drops its dialog, and close expired dialogs in open tabs

* fix(updates): skip a locker whose re-listing fails; document the notifications subscribe body

* fix(updates): fail the install cleanup when a re-listing fails

Skipping the locker let rollback take an unfinished cleanup as done and restore the installation while a runtime still ran from it.

* fix(notifications): do not carry a request id past the dialog id limit

pi's ids are UUIDs; an oversized one could take the push past 3993 bytes on its own.
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.

Windows: in-app update refuses with not_controllable — a task-scheduled daemon is misdetected as the Windows service 'Schedule'

1 participant