Skip to content

Windows: runner heartbeat spawns node.exe with a visible flashing console window every ~20-30s #226

Description

@LionLai

Summary

On Windows, the machine runner (ama-runner.exe) spawns a short-lived node.exe child process roughly every 20–30 seconds (runtime heartbeat / availability probe). Each spawn allocates a new console window (conhost.exe), so the user sees a cmd/console window flash on screen every ~20–30 seconds for as long as the runner daemon is running. Functionality is unaffected; it is a constant visual disturbance.

Command

ak start

(daemon running normally afterwards; the flashing starts as soon as the runner is online)

Expected

Background child processes spawned by the runner are invisible — no console window appears. This is what ak itself already does for the daemon process (the CLI passes windowsHide: true when spawning the runner in packages/cli/src/commands/start.ts).

Actual

Every ~20–30s a console window flashes and disappears. Process monitoring shows:

node.exe   (parent = ama-runner.exe, the runner daemon PID)
└─ conhost.exe   ← the visible flashing console window

Captured twice within a 45-second observation window; the node.exe child lives for well under a second (its command line could not even be sampled via WMI before exit). Timing matches the runner's runtime heartbeat, which probes the installed runtime CLIs (claude-code, codex, copilot) — these are Node.js programs on Windows, so each probe launches node.exe.

For comparison, Docker Desktop performs similar periodic child-process probes (docker stats) on the same machine with no visible window, because it creates its children with a hidden console.

Likely cause / suggested fix

ama-runner (Go) appears to spawn child processes without suppressing console allocation on Windows. Setting syscall.SysProcAttr{HideWindow: true, CreationFlags: windows.CREATE_NO_WINDOW} on the exec.Cmd used for runtime probes (and any other periodic child spawns) should fix it. macOS/Linux are unaffected, which is probably why this went unnoticed.

Context

  • ak version: 1.15.0
  • ama-runner: 0.7.0 (3f1b968, built 2026-07-18T04:35:57Z)
  • OS: Windows 11 Home 10.0.26200
  • Runtime: claude (installed via npm, claude.cmd shim → node)
  • Auth type: machine
  • Providers reported by runner: codex, claude-code, copilot

Reproduction

  1. On Windows 11, install agent-kanban globally via npm (Node runtimes such as Claude Code installed via npm as well).
  2. ak start and complete AMA device login; runner goes online.
  3. Watch the screen (or monitor process creation): a node.exe + conhost.exe pair is created by ama-runner.exe every ~20–30s, flashing a console window each time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions