Skip to content

feat(watchdog): auto-start watchdogs minimized at login (#11) - #12

Merged
Hrt-Htk merged 1 commit into
mainfrom
feat/issue11-watchdog-autostart
Jul 16, 2026
Merged

feat(watchdog): auto-start watchdogs minimized at login (#11)#12
Hrt-Htk merged 1 commit into
mainfrom
feat/issue11-watchdog-autostart

Conversation

@Hrt-Htk

@Hrt-Htk Hrt-Htk commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

Auto-start the chat and embed watchdogs, minimized to the taskbar, at login — without breaking the daily graceful restart.

Closes #11.

Changes

  • create-startup-shortcuts.ps1 (new) — installs/removes minimized Startup-folder shortcuts for both watchdogs. Runs at logon in the interactive session, non-elevated (fires on the machine''s password-less auto-login, needs no stored credentials, and avoids the elevated-orphan-worker issue seen with /RL HIGHEST tasks). Supports -Remove to uninstall.
  • watchdog.ps1 / watchdog-embed.ps1 — set stable console titles (llama-chat-watchdog, llama-embed-supervisor) so the restart scripts find each window reliably. Titles are chosen so the chat restart (*watchdog*) no longer accidentally matches the embed watchdog window.
  • restart-watchdog.ps1 / restart-watchdog-embed.ps1 — relaunch minimized so windows stay minimized after the midnight restart.

Why minimized, not hidden

The daily restart finds each watchdog console window by title and sends WM_CLOSE to cascade a clean llama-server shutdown. A hidden window has no handle to target, so the watchdogs run minimized (handle/title preserved) rather than fully hidden.

Testing

  • Installed shortcuts and verified both resolve to the correct target with WindowStyle=7 (minimized).
  • Launched both watchdogs minimized; :8001 and :8003 /health both return 200, with 2x llama-server + 2x python running.
  • Note: does not depend on #8; branched from main.

🤖 Generated with Claude Code

Add create-startup-shortcuts.ps1 to install/remove minimized Startup-folder
shortcuts for both watchdogs. Runs at logon in the interactive session,
non-elevated (fires on auto-login, no stored credentials needed, and avoids
the elevated-orphan-worker issue from /RL HIGHEST tasks).

Set stable console titles (llama-chat-watchdog, llama-embed-supervisor) so the
daily restart scripts find each window reliably; titles are chosen so the chat
restart no longer accidentally matches the embed watchdog window.

Relaunch minimized in restart-watchdog.ps1 / restart-watchdog-embed.ps1 so the
windows stay minimized after the midnight restart. Minimized (not hidden)
preserves the window handle/title that the WM_CLOSE shutdown cascade targets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Hrt-Htk
Hrt-Htk merged commit 32b2eba into main Jul 16, 2026
1 check passed
@Hrt-Htk
Hrt-Htk deleted the feat/issue11-watchdog-autostart branch July 16, 2026 06:55
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.

Auto-start watchdogs at login (minimized) and keep the midnight restart working

1 participant