Skip to content

fix(ports): the daemon's children open no console window on Windows - #1076

Merged
V3RON merged 4 commits into
callstackincubator:mainfrom
leonardoxr:fix/windows-hide-child-consoles
Oct 30, 2026
Merged

V3RON merged 4 commits into
callstackincubator:mainfrom
leonardoxr:fix/windows-hide-child-consoles

Conversation

@leonardoxr

@leonardoxr leonardoxr commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

On Windows the daemon runs with no console, so every console program it starts gets a new, visible window. The agent-device daemons and Simlock's adb server stay open as windows. The phone presence check (adb … getprop) and the warm pool's avdmanager list device flash one every 30 s, even with nothing leased.

Every child the ports start now passes windowsHide: true: NodeProcessRunner.spawn and spawnStreaming, NodeBytePipeLauncher.start, and the detached daemon and updater launches. The CLI passthrough keeps its console on purpose, since adb shell needs the user's terminal.

Verified: a 100 s watch on Windows 11, across a daemon restart, saw 0 new visible windows. The test checks the option each adapter hands spawn, because a test runner has a console and cannot show the window.

Part of #1068.

Review

Spec review: skipped. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 11.6M.
Runs: 24. Cost USD: 3.838. Agent seconds: 2297.

Slow lane: not run. windowsHide is a no-op on macOS, and the Windows behaviour cannot be tested on the delivery Mac.

Assessment: complete

Status

Implement: done (main merged 901a085) Review: fix-check passed at 901a085, 0 open Hardware: n/a Gate: running

Written by an agent.

The daemon runs with no console. On Windows, a console program started
from such a process without `windowsHide` gets a new, visible console:
the agent-device daemons and simlock's adb server stay open as windows,
and the 30 s adb presence check and `avdmanager list device` flash one
each time. `NodeProcessRunner.spawn` and `spawnStreaming` and
`NodeBytePipeLauncher.start` now pass `windowsHide: true`. The CLI's
passthrough keeps its console on purpose: it runs in the user's own
terminal with inherited stdio, which `adb shell` needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: adfedacb-014f-4ac9-b747-049f9465bbfd
Commits

Reviewing files that changed from the base of the PR and between 99fa19b and 901a085.

Files selected for processing: 2
  • src/ports/AGENTS.md
  • src/ports/process-runner.ts

Limit details: You’ve used all 10 included reviews currently available.

Walkthrough

The process runner and byte-pipe launcher now set windowsHide: true when spawning child processes. Tests check this option across five adapter paths. Port descriptions now document the Windows setting.

Suggested reviewers: v3ron

Priority: Low

Merge Risk: Minimal · up to 901a0

No actionable merge-blocking risk is evident; the Windows child-window change is covered across the documented adapter paths.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title states the main change: children started by the daemon on Windows should open no console window. The changeset adds windowsHide: true to NodeProcessRunner.spawn and spawnStreaming, NodeByteP…
Description check Passed The description is directly related to the changeset. It explains why children open visible Windows consoles, names the adapters that now pass windowsHide: true (NodeProcessRunner.spawn and spawnStrea…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: children started by the daemon on Windows should open no console window. The changeset adds windowsHide: true to NodeProcessRunner.spawn and spawnStreaming, NodeBytePipeLauncher.start, and the detached daemon and updater launches, which matches the title. The title is specific and concise, and it uses the conventional fix(ports) prefix.

Full details: Description check

Explanation

The description is directly related to the changeset. It explains why children open visible Windows consoles, names the adapters that now pass windowsHide: true (NodeProcessRunner.spawn and spawnStreaming, NodeBytePipeLauncher.start, and the detached daemon and updater launches), and states that the CLI passthrough keeps its console on purpose. It also describes how the change was verified and how the test checks the spawn option.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 2
  • Waived: $0.50 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Comment @coderabbitai help to get the list of available commands.

@leonardoxr leonardoxr mentioned this pull request Oct 30, 2026
8 tasks
leonardoxr and others added 2 commits October 30, 2026 11:40
Node gives a detached child on Windows a console window of its own
(https://nodejs.org/api/child_process.html#optionsdetached), so the
daemon `simlock daemon start` or an auto-launch spawns, and the updater,
would each open one on the desktop, and closing it ends the process.
Both launchers now pass `windowsHide: true`; elsewhere it does nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sole window

The two detached launches (the CLI starting the daemon, the daemon
starting the updater) now pass `windowsHide`, like every other child
the ports start; the spawn-options test covers them, and fails without
the option.

Addresses blind review R1 on callstackincubator#1076.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leonardoxr

leonardoxr commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: dcd4394
Round 2: 99fa19b
Round fix-check: 901a085

Runs: 24. Cost USD: 3.8469. Agent seconds: 2301.
Tokens input 476, output 91332, cache read 6477397, cache write 705895.
- review 1 reviewer: claude-sonnet-5-5 225 s $0.2038
- review 1 reviewer: claude-sonnet-5-5 289 s $0.2118
- review 1 code both: claude-opus-5-5 131 s $0.4617
- review 1 claims: claude-sonnet-5-5 28 s $0.0935
- review 1 code both: claude-opus-5-5 187 s $0.5784
- review 1 claims: claude-sonnet-5-5 23 s $0.0648
- fix 1 implementer: claude-sonnet-5-5 109 s $0.1018
- fix 1 implementer: claude-sonnet-5-5 123 s $0.1439
- review 2 reviewer: claude-sonnet-5-5 41 s $0.113
- review 2 reviewer: claude-sonnet-5-5 123 s $0.1695
- review fix-check reviewer: claude-sonnet-5-5 117 s $0.1424
- fix implementer: claude-sonnet-5-5 47 s $0.0771
- review fix-check reviewer: claude-sonnet-5-5 59 s $0.1875
- hardware hardware-verifier: claude-sonnet-5-5 7 s $0.0561
- fix implementer: claude-sonnet-5-5 49 s $0.0818
- review fix-check reviewer: claude-sonnet-5-5 40 s $0.116
- fix implementer: claude-sonnet-5-5 66 s $0.1382
- review fix-check reviewer: claude-sonnet-5-5 41 s $0.1166
- hardware hardware-verifier: claude-sonnet-5-5 228 s $0.0682
- hardware-fix implementer: claude-sonnet-5-5 174 s $0.1277
- fix implementer: claude-sonnet-5-5 34 s $0.1337
- review fix-check reviewer: claude-sonnet-5-5 53 s $0.1665
- fix implementer: claude-sonnet-5-5 53 s $0.1392
- review fix-check reviewer: claude-sonnet-5-5 54 s $0.1537
Finding outcomes: {"fixed":1}. Classes: {"detached spawn sites lack windowsHide":1}.
{"findings":[{"id":"R1","role":"code","class":"detached spawn sites lack windowsHide","outcome":"fixed","path":"src/ports/daemon-launcher.ts","round":"1","fix":"816e8fc5"}]}

Written by an agent.

@leonardoxr
leonardoxr marked this pull request as ready for review October 30, 2026 16:17
@V3RON
V3RON merged commit 8cb0ab4 into callstackincubator:main Oct 30, 2026
54 checks passed
@V3RON

V3RON commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Review findings

  • R1 (docs, documentation 7). src/ports/AGENTS.md:14 and :32 restate windowsHide, which byte-pipe.ts and process-runner.ts already explain in why: comments.

No code findings.

Found by a post-merge review (code and claims lenses; no spec lens, as no issue is linked), checked on Windows 11 where a claim needed it. Fixes follow in separate PRs.

Written by an agent.

V3RON added a commit that referenced this pull request Nov 17, 2026
…ames the Windows SDK default (#1671)

Fixes the documentation findings of the post-merge review of #1052 #1053
#1054 #1076 #1077 #1078 #1079.

## Rule 7: manual lines that restate code

Most flagged lines were already gone after a later manual rewrite on
main. Deleted here, each said by the code named:

- `daemon`: the Windows pipe line (`connection-host.ts:81`); what a
failed start disposes (`server.ts` `#releaseFailedStart`,
`worker-composition.ts:759`).
- `ports`: pipe never `stat`ed/removed (`isPipeEndpoint`); second
listener `address-in-use` (`connection-host.ts:81`); `windowsHide`
(adapter `why:` comments, `child-window.test.ts`); `cmd.exe` and refused
arguments (`windows-command.ts`).
- `drivers/android`: how long the `avdmanager list device` answer is
kept (`AvdmanagerDeviceList`).

Kept: the pipe ACL rationale and known gap; "the sdkmanager catalog is
never read"; the reap safety rules in `drivers/android` and
`agent-device`; the `DaemonAlreadyRunningError` trap.

## Rule 9: Windows SDK default

`cli.mdx` and `requirements.mdx` add `%LOCALAPPDATA%\Android\Sdk`, as
`defaultSdkRoot` (`sdk-paths.ts`) does.

Manual, stale-ref and docs tests pass; website build and
`check-openapi.mjs` pass.

## Review

Spec review: skipped. Code review: skipped. Claims review: 0 blocking, 0
fixed, 0 notes.
Rounds: 1. Tokens: 0.5M.
Runs: 3. Cost USD: 0.318. Agent seconds: 115.

Spec review skipped: the PR closes no issue. Code review skipped: no
code or test line changed. The first coordinator run started no claims
lens (incomplete); a second ran it at 0b32d58 (F0). The later merge of
main touches no file of this diff.

Assessment: complete

*Written by an agent.*
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.

2 participants