collie icon indicating copy to clipboard operation
collie copied to clipboard

Windows: a slow PowerShell start makes Collie report its Task Scheduler task as missing, which blocks the phone's Update button

Open EricSanzLuna opened this issue 3 weeks ago • 1 comments

What happened, and what did you expect?

On Windows, Collie reports that the Task Scheduler task herdr.collie does not exist when it does and is running. This blocks the phone's Update button. The preflight shows 1 red · 1 amber, and the red line reads:

red:    service        no Task Scheduler task herdr.collie, so an update would have nothing to restart → collie start

collie doctor says windows-task — no task herdr.collie is registered, and collie status says service Task Scheduler (herdr.collie) · not registered. At the same moment, schtasks /query /tn herdr.collie lists the task as running, and the bridge works.

Cause. queryTask (cli/task-scheduler.ts) runs powershell -NoProfile -NonInteractive -Command "… Get-ScheduledTask …" with PROCESS_QUERY_TIMEOUT_MS (10 s, cli/sys.ts). When the call runs past that limit, the result has a non-zero code, so queryTask returns null, which callers read as "no task". On this machine (a corporate Windows 11 laptop with endpoint security), the query is slower than that:

Command, run from a fresh process Time
powershell -NoProfile -NonInteractive -Command "1" 3.6–5.6 s
powershell -NoProfile -NonInteractive -Command "Import-Module ScheduledTasks" 7.7 s
powershell … "$t = Get-ScheduledTask -TaskName 'herdr.collie'; [string]$t.State" 10.4 s, 10.7 s, 32.2 s (three runs)
schtasks /query /tn herdr.collie 0.7 s

A timeout reads the same as a missing task. When the query cannot be answered, Collie says the task does not exist, so it tells the user to run collie start instead of saying it could not check.

Expected. One of these, or a mix:

  1. Treat a timed-out query as "unknown", not as "not registered". The update preflight could then warn instead of going red, or retry with PROCESS_QUERY_SLOW_START_MS (60 s), which sys.ts already defines for callers that can wait.
  2. Use the longer timeout for queryTask on the paths that can afford it: status, doctor and the update preflight.
  3. Check that the task exists with schtasks /query /tn herdr.collie /xml, which returns the same state, action and priority in under a second without starting PowerShell.

Workaround. collie update from a terminal works and passed its health check (1.23.3 → 1.27.4). Only the phone button is blocked, along with the misleading status and doctor lines. The behavior is the same in 1.27.4, and PROCESS_QUERY_TIMEOUT_MS is still 10 s on main.

Separate amber, for completeness: disk — could not read the free space at …\AppData\Local\collie — proceeding blind. That check probably uses the same PowerShell path and hits the same limit, but I have not confirmed it.

Output of collie doctor --json

Usernames and the tailnet name are replaced with <user> and <tailnet>.

[
  {
    "check": "collie",
    "status": "ok",
    "detail": "v1.27.4+9ca3670908 · windows-x64",
    "remedy": null,
    "instance": null,
    "stateDir": "C:\\Users\\<user>\\.local\\state\\collie"
  },
  {
    "check": "config-file",
    "status": "skipped",
    "detail": "home C:\\Users\\<user>\\.collie\\config.toml (absent) · instance C:\\Users\\<user>\\AppData\\Roaming\\herdr\\plugins\\config\\herdr.collie\\config.toml (absent) — no config file, the env decides everything",
    "remedy": "`collie config init`"
  },
  {
    "check": "web-dist",
    "status": "ok",
    "detail": "27 entries, index.html present",
    "remedy": null
  },
  {
    "check": "path-link",
    "status": "ok",
    "detail": "not linked — `collie link` would publish C:\\Users\\<user>\\.local\\bin\\collie → C:\\Users\\<user>\\AppData\\Local\\collie\\current\\bin\\collie.exe",
    "remedy": null
  },
  {
    "check": "install",
    "status": "ok",
    "detail": "binary install, version 1.27.4 at C:\\Users\\<user>\\AppData\\Local\\collie (1 previous kept)",
    "remedy": null
  },
  {
    "check": "versions",
    "status": "ok",
    "detail": "current 1.27.4 · 1 retained (1.23.3)",
    "remedy": null
  },
  {
    "check": "update-source",
    "status": "ok",
    "detail": "github.com/AltanS/collie",
    "remedy": null
  },
  {
    "check": "bind",
    "status": "ok",
    "detail": "127.0.0.1 (mode solo)",
    "remedy": null
  },
  {
    "check": "bind-wildcard",
    "status": "ok",
    "detail": "bound to one address",
    "remedy": null
  },
  {
    "check": "tailscale",
    "status": "ok",
    "detail": "running and signed in, this machine is <user>.<tailnet>.ts.net",
    "remedy": null
  },
  {
    "check": "tailnet-https",
    "status": "ok",
    "detail": "MagicDNS name <user>.<tailnet>.ts.net, HTTPS certificates on",
    "remedy": null
  },
  {
    "check": "acl",
    "status": "ok",
    "detail": "inbound packet filter is non-empty — can't disprove reachability; non-empty proves nothing",
    "remedy": null
  },
  {
    "check": "front-door",
    "status": "warn",
    "detail": ":443 proxies to http://127.0.0.1:8787, but Collie has no record of this mapping (it was made by hand)",
    "remedy": "run `collie start` once; it adopts this mapping and records it"
  },
  {
    "check": "pairing",
    "status": "ok",
    "detail": "2 device(s) paired",
    "remedy": null
  },
  {
    "check": "mux",
    "status": "skipped",
    "detail": "tuios — registered, but `collie doctor` has no liveness probe for it",
    "remedy": "ask that multiplexer whether it is running, by hand; `collie doctor` reports tmux and zellij"
  },
  {
    "check": "windows-task",
    "status": "skipped",
    "detail": "no task herdr.collie is registered",
    "remedy": "`collie start` registers it"
  },
  {
    "check": "windows-long-paths",
    "status": "ok",
    "detail": "LongPathsEnabled is 1, and the install folder is 55 characters long",
    "remedy": null
  },
  {
    "check": "secrets-private",
    "status": "ok",
    "detail": "the Collie state folder and the Collie config folder are private to your account, SYSTEM and Administrators",
    "remedy": null
  },
  {
    "check": "beacon-hooks-claude",
    "status": "ok",
    "detail": "not needed — tuios reports agents itself; hooks installed: no",
    "remedy": null
  },
  {
    "check": "beacons",
    "status": "skipped",
    "detail": "nothing writes one here, because the emitter is not installed",
    "remedy": "`collie hooks install claude`"
  },
  {
    "check": "skill-walky-talky",
    "status": "ok",
    "detail": "current in claude, codex, opencode, gemini",
    "remedy": null
  },
  {
    "check": "account-windows",
    "status": "ok",
    "detail": "claude: on (reads ~/.claude/.credentials.json, asks api.anthropic.com); codex: on (reads ~/.codex/sessions); opencode: off by default, unverified (COLLIE_ACCOUNT_WINDOWS=all); grok: off by default, unverified (COLLIE_ACCOUNT_WINDOWS=all)",
    "remedy": null
  },
  {
    "check": "telemetry",
    "status": "ok",
    "detail": "on, decided by default (as the running bridge sees it)",
    "remedy": null
  },
  {
    "check": "agent-sessions",
    "status": "ok",
    "detail": "3 agent pane(s), 3 of them on an agent this build can read a journal for — every one of those reports a session",
    "remedy": null
  },
  {
    "check": "journal-roots",
    "status": "ok",
    "detail": "4 of 13 roots present — claude: C:\\Users\\<user>\\.claude\\projects, agy: C:\\Users\\<user>\\.gemini\\antigravity-cli, codex: C:\\Users\\<user>\\.codex\\sessions, hermes: C:\\Users\\<user>\\AppData\\Local\\hermes (resolved from C:\\Users\\<user>; the BRIDGE resolves them from ITS OWN user's home)",
    "remedy": null
  },
  {
    "check": "cache-claims",
    "status": "ok",
    "detail": "12 cache rules and 8 reset rules, every claim carrying the page it was read on; the oldest was checked 76 days ago",
    "remedy": null
  },
  {
    "check": "cache-rules",
    "status": "ok",
    "detail": "no C:\\Users\\<user>\\AppData\\Roaming\\herdr\\plugins\\config\\herdr.collie/cache-rules.toml — every TTL is the shipped rule",
    "remedy": null
  },
  {
    "check": "cache-env",
    "status": "ok",
    "detail": "no Claude Code cache variable is set in this shell",
    "remedy": null
  },
  {
    "check": "surface",
    "status": "ok",
    "detail": "last 7 days: free 39131 · unknown 210 · manual 0 · 14 day files in C:\\Users\\<user>\\.local\\state\\collie\\surface · examples C:\\Users\\<user>\\.local\\state\\collie\\surface\\examples (1 files) · inbox C:\\Users\\<user>\\.local\\state\\collie\\surface\\inbox.jsonl",
    "remedy": null
  },
  {
    "check": "surface-claude-2.1.316",
    "status": "ok",
    "detail": "2.1.316 provisional · free 8562 · unknown 22 (weak-cue 15, no-match 5, torn 2) · modal 141 (unreadable 76, menu 57, question 8) · refused 0 · probed 0 · manual 0 · sent 0 · effective 0 · unknown-outcome 0 · typed-not-submitted 0 · discarded 0",
    "remedy": null
  },
  {
    "check": "surface-claude-2.1.317",
    "status": "ok",
    "detail": "2.1.317 provisional · free 4743 · unknown 2 (no-match 1, torn 1) · modal 39 (question 37, unreadable 2) · refused 0 · probed 0 · manual 0 · sent 0 · effective 0 · unknown-outcome 0 · typed-not-submitted 0 · discarded 0",
    "remedy": null
  },
  {
    "check": "surface-claude-2.1.318",
    "status": "ok",
    "detail": "2.1.318 provisional · free 9484 · unknown 88 (torn 48, no-match 32, weak-cue 6, stale 2) · modal 262 (unreadable 137, menu 115, question 10) · refused 0 · probed 0 · manual 0 · sent 0 · effective 0 · unknown-outcome 0 · typed-not-submitted 0 · discarded 0",
    "remedy": null
  },
  {
    "check": "surface-claude-2.1.319",
    "status": "ok",
    "detail": "2.1.319 provisional · free 16221 · unknown 94 (weak-cue 56, no-match 37, stale 1) · modal 197 (question 95, unreadable 66, menu 36) · refused 0 · probed 1 · manual 0 · sent 1 · effective 0 · unknown-outcome 0 · typed-not-submitted 0 · discarded 0",
    "remedy": null
  },
  {
    "check": "surface-claude-unread",
    "status": "ok",
    "detail": "unread provisional · free 121 · unknown 4 (no-match 4) · modal 3 (unreadable 3) · refused 0 · probed 0 · manual 0 · sent 0 · effective 0 · unknown-outcome 0 · typed-not-submitted 0 · discarded 0",
    "remedy": null
  },
  {
    "check": "harness-agy",
    "status": "warn",
    "detail": "C:\\Users\\<user>\\AppData\\Local\\agy\\bin\\agy.EXE · unread (the command did not finish in time)",
    "remedy": "C:\\Users\\<user>\\AppData\\Local\\agy\\bin\\agy.EXE resolves but its version did not read; a wrapper first on PATH that needs $HOME, or a broken install. Until it reads, sends to agy run on a provisional profile with an untrusted turn",
    "harness": "agy",
    "binary": "C:\\Users\\<user>\\AppData\\Local\\agy\\bin\\agy.EXE",
    "version": null,
    "profileStatus": null
  },
  {
    "check": "harness-claude",
    "status": "ok",
    "detail": "C:\\Users\\<user>\\.local\\bin\\claude.EXE · 2.1.319 · provisional, note: above the verified range; sends in a turn are trusted, dialogs may drift",
    "remedy": null,
    "harness": "claude",
    "binary": "C:\\Users\\<user>\\.local\\bin\\claude.EXE",
    "version": "2.1.319",
    "profileStatus": "provisional"
  },
  {
    "check": "harness-codex",
    "status": "ok",
    "detail": "C:\\Users\\<user>\\AppData\\Roaming\\npm\\codex.CMD · 0.167.0 · provisional, note: above the verified range; sends in a turn are trusted, dialogs may drift",
    "remedy": null,
    "harness": "codex",
    "binary": "C:\\Users\\<user>\\AppData\\Roaming\\npm\\codex.CMD",
    "version": "0.167.0",
    "profileStatus": "provisional"
  },
  {
    "check": "harness-cursor",
    "status": "ok",
    "detail": "not installed",
    "remedy": null,
    "harness": "cursor",
    "binary": null,
    "version": null,
    "profileStatus": null
  },
  {
    "check": "harness-grok",
    "status": "ok",
    "detail": "not installed",
    "remedy": null,
    "harness": "grok",
    "binary": null,
    "version": null,
    "profileStatus": null
  },
  {
    "check": "harness-hermes",
    "status": "warn",
    "detail": "C:\\Users\\<user>\\AppData\\Local\\hermes\\bin\\hermes.CMD · unread (the command did not finish in time)",
    "remedy": "C:\\Users\\<user>\\AppData\\Local\\hermes\\bin\\hermes.CMD resolves but its version did not read; a wrapper first on PATH that needs $HOME, or a broken install. Until it reads, sends to hermes run on a provisional profile with an untrusted turn",
    "harness": "hermes",
    "binary": "C:\\Users\\<user>\\AppData\\Local\\hermes\\bin\\hermes.CMD",
    "version": null,
    "profileStatus": null
  },
  {
    "check": "harness-kiro",
    "status": "ok",
    "detail": "not installed",
    "remedy": null,
    "harness": "kiro",
    "binary": null,
    "version": null,
    "profileStatus": null
  },
  {
    "check": "harness-muse",
    "status": "ok",
    "detail": "not installed",
    "remedy": null,
    "harness": "muse",
    "binary": null,
    "version": null,
    "profileStatus": null
  },
  {
    "check": "harness-omp",
    "status": "ok",
    "detail": "not installed",
    "remedy": null,
    "harness": "omp",
    "binary": null,
    "version": null,
    "profileStatus": null
  },
  {
    "check": "harness-opencode",
    "status": "ok",
    "detail": "not installed",
    "remedy": null,
    "harness": "opencode",
    "binary": null,
    "version": null,
    "profileStatus": null
  },
  {
    "check": "harness-pi",
    "status": "ok",
    "detail": "not installed",
    "remedy": null,
    "harness": "pi",
    "binary": null,
    "version": null,
    "profileStatus": null
  },
  {
    "check": "sends-agy",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "agy",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-claude",
    "status": "ok",
    "detail": "1 sent · last 7 days",
    "remedy": null,
    "harness": "claude",
    "window": {
      "count": 1,
      "days": 7
    },
    "counts": {
      "sent": 1
    },
    "byCollie": {
      "1.27.4+9ca3670908": {
        "sent": 1
      }
    }
  },
  {
    "check": "sends-codex",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "codex",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-cursor",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "cursor",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-grok",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "grok",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-hermes",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "hermes",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-kiro",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "kiro",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-muse",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "muse",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-omp",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "omp",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-opencode",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "opencode",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "sends-pi",
    "status": "ok",
    "detail": "no sends in the last 7 days",
    "remedy": null,
    "harness": "pi",
    "window": {
      "count": 0,
      "days": 7
    },
    "counts": {},
    "byCollie": {}
  },
  {
    "check": "holds",
    "status": "ok",
    "detail": "no held sends open",
    "remedy": null,
    "holds": []
  },
  {
    "check": "screen-claude",
    "status": "ok",
    "detail": "no stale screen, no probe failure",
    "remedy": null,
    "harness": "claude"
  },
  {
    "check": "restart-pending",
    "status": "ok",
    "detail": "the running bridge reports it is executing the version installed at C:\\Users\\<user>\\AppData\\Local\\collie\\versions\\1.27.4\\bin\\collie.exe — judged by version alone on this platform, where the executable itself cannot be compared",
    "remedy": null
  },
  {
    "check": "clock",
    "status": "skipped",
    "detail": "solo — there is no far side to compare against, and inventing a reference clock is worse than silence",
    "remedy": "re-run `collie doctor` once this collie is in a crew"
  }
]

EricSanzLuna avatar Nov 10 '26 18:11 EricSanzLuna

Thanks @EricSanzLuna, this is fixed in 1.28.2. Your diagnosis is right: a PowerShell start above 10 seconds made Collie read "could not ask" as "no task". Collie now asks schtasks first, which needs no PowerShell start, and when it cannot read the task it says so and no longer tells a working install to run collie start. One change you will see: collie status says "registered" for the task where it said Running or Ready. Please reopen this if it comes back.

AltanS avatar Nov 11 '26 21:11 AltanS