Hide Windows discovery and agent subprocess windows #77

Closed
opened 2026-10-11 22:03:54 +09:00 by dreampiler · 2 comments
Owner

Owner goal: Operations relays the owner's 2026-10-11 21:4x KST complaint, 「지금 터미널로 cmd 실행창이 엄청 뜨는데 뭐가 문제야?」, and explicitly requests a small Windows subprocess-window fix.
Observable result: Windows discovery and agent child processes launched by the backend and agentctl do not create visible cmd/terminal windows, including when the host process has no console. Discovery results, ACP/agent stdio, exit codes, cancellation, process ownership and intentional terminal functionality remain correct.
Operations reports capturing e44's task-owned backend __backend on port48931 creating consoles during minute-period discovery (hermes.cmd acp --check, opencode --version) and stopping that backend/agentctl. Its conhost --headless operating wrapper masked the generic Windows issue. These are supplied observations; confirm the responsible child-launch paths in the assigned source, not from timing alone.

Scope: the smallest one-PR change applying Windows SysProcAttr HideWindow and/or CREATE_NO_WINDOW to the backend and agentctl's discovery/agent subprocess launch paths, using current platform-specific helpers where available. Preserve existing SysProcAttr fields/creation flags, job/process-group/handle/cancellation behavior, stdio/ACP and any intentional terminal semantics; no blanket new abstraction or launcher redesign. Determine actual necessary launch sites and any upstream equivalent before changing code. Non-Windows behavior is unchanged. This task does not fix restart admission, retention, runtime profiles/quotas, credential setup or Core_Manager prompts.

First deliver a lean repository-required requirements/system-design/plan/work-order package before production/permanent-test edits, citing assigned-worktree scoped AGENTS and relevant Windows subprocess/lifecycle/agentctl conventions and design-card3-5 (D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/, card lines28-32 and relevant index pointers). Current code cannot redefine the requested no-visible-console behavior. If already fixed, verify the actual caller path and report source/observable result rather than duplicating code. After the explicit package checkpoint, the normal later implementation/review/merge workflow applies.

Validation: reuse existing narrow changed-logic source-adjacent tests and, where needed, add only such unit tests. Perform a finite task-owned Windows child-process demonstration of no visible window under the relevant console-less calling path and preserved discovery/stdio/cancel behavior; record actual executable/entry and result. Temporary helper/probe files stay untracked in the assigned worktree outside automatic test collection; no new permanent E2E/CI/framework/monitor/audit or full suite. Do not create a new command runner merely for verification. Do not run or stop foreign processes or call credential/installation/provider setup flows. If an isolated Kandev instance is needed, ONLY scripts/dev-isolated.ps1 (hidden console), then scripts/kandev-kill.ps1 with the owned pidfile. Never directly launch kandev.exe/__backend or bypass that script after refusal; report the exact boundary instead. No visible Start-Process, direct operating launch, global process sweep or Windows scheduler.

Completion: necessary fix + narrow evidence + independent exact-head fork review + forkmain merge and normal jobsheet/owned cleanup; no claim of no visible windows from flags/source existence alone. Any final installed readback/backport/build selection is Operations-owned under existing approval; no operating replacement by this task. Root's new direct-launch restriction is a task rule, not permission to change Core_Manager source here.
Execution: standing parent8e3eb6b7; workspace94852851-6893-4289-908a-53022d15fd68; explicit Worktree08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. Use only the platform-assigned task worktree and record its path. No shared source edits, additional worktree/session/native worker/manual model, operating DB/process/settings changes, hash/fingerprint/ledger/gate additions or credential handling/output. Own disposable cleanup uses full literal absolute paths and the established recyclable procedure; unknown/foreign files remain.
Fork operations name --repo dreampiler/kandev. The suggestion that this is suitable upstream is NOT general kdlbs publication authorization: W091 fixedOpus alone owns upstream writes after history/ledger and actual approval review. Report a candidate/preparation result to the parent; no upstream issue/PR/push/comment here. Engineering artifacts/public PR text are English and omit personal paths/internal operating data. Report verified facts versus assumptions, exact head/paths, scope/evidence, remaining inputs and next actor. Stop at the completed design checkpoint; do not substitute generic implementation envelopes or invent an approval question/model switch.

Owner goal: Operations relays the owner's 2026-10-11 21:4x KST complaint, 「지금 터미널로 cmd 실행창이 엄청 뜨는데 뭐가 문제야?」, and explicitly requests a small Windows subprocess-window fix. Observable result: Windows discovery and agent child processes launched by the backend and agentctl do not create visible cmd/terminal windows, including when the host process has no console. Discovery results, ACP/agent stdio, exit codes, cancellation, process ownership and intentional terminal functionality remain correct. Operations reports capturing e44's task-owned backend __backend on port48931 creating consoles during minute-period discovery (hermes.cmd acp --check, opencode --version) and stopping that backend/agentctl. Its conhost --headless operating wrapper masked the generic Windows issue. These are supplied observations; confirm the responsible child-launch paths in the assigned source, not from timing alone. Scope: the smallest one-PR change applying Windows SysProcAttr HideWindow and/or CREATE_NO_WINDOW to the backend and agentctl's discovery/agent subprocess launch paths, using current platform-specific helpers where available. Preserve existing SysProcAttr fields/creation flags, job/process-group/handle/cancellation behavior, stdio/ACP and any intentional terminal semantics; no blanket new abstraction or launcher redesign. Determine actual necessary launch sites and any upstream equivalent before changing code. Non-Windows behavior is unchanged. This task does not fix restart admission, retention, runtime profiles/quotas, credential setup or Core_Manager prompts. First deliver a lean repository-required requirements/system-design/plan/work-order package before production/permanent-test edits, citing assigned-worktree scoped AGENTS and relevant Windows subprocess/lifecycle/agentctl conventions and design-card3-5 (D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/, card lines28-32 and relevant index pointers). Current code cannot redefine the requested no-visible-console behavior. If already fixed, verify the actual caller path and report source/observable result rather than duplicating code. After the explicit package checkpoint, the normal later implementation/review/merge workflow applies. Validation: reuse existing narrow changed-logic source-adjacent tests and, where needed, add only such unit tests. Perform a finite task-owned Windows child-process demonstration of no visible window under the relevant console-less calling path and preserved discovery/stdio/cancel behavior; record actual executable/entry and result. Temporary helper/probe files stay untracked in the assigned worktree outside automatic test collection; no new permanent E2E/CI/framework/monitor/audit or full suite. Do not create a new command runner merely for verification. Do not run or stop foreign processes or call credential/installation/provider setup flows. If an isolated Kandev instance is needed, ONLY scripts/dev-isolated.ps1 (hidden console), then scripts/kandev-kill.ps1 with the owned pidfile. Never directly launch kandev.exe/__backend or bypass that script after refusal; report the exact boundary instead. No visible Start-Process, direct operating launch, global process sweep or Windows scheduler. Completion: necessary fix + narrow evidence + independent exact-head fork review + forkmain merge and normal jobsheet/owned cleanup; no claim of no visible windows from flags/source existence alone. Any final installed readback/backport/build selection is Operations-owned under existing approval; no operating replacement by this task. Root's new direct-launch restriction is a task rule, not permission to change Core_Manager source here. Execution: standing parent8e3eb6b7; workspace94852851-6893-4289-908a-53022d15fd68; explicit Worktree08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. Use only the platform-assigned task worktree and record its path. No shared source edits, additional worktree/session/native worker/manual model, operating DB/process/settings changes, hash/fingerprint/ledger/gate additions or credential handling/output. Own disposable cleanup uses full literal absolute paths and the established recyclable procedure; unknown/foreign files remain. Fork operations name --repo dreampiler/kandev. The suggestion that this is suitable upstream is NOT general kdlbs publication authorization: W091 fixedOpus alone owns upstream writes after history/ledger and actual approval review. Report a candidate/preparation result to the parent; no upstream issue/PR/push/comment here. Engineering artifacts/public PR text are English and omit personal paths/internal operating data. Report verified facts versus assumptions, exact head/paths, scope/evidence, remaining inputs and next actor. Stop at the completed design checkpoint; do not substitute generic implementation envelopes or invent an approval question/model switch.
Author
Owner

W100 done: fork PR dreampiler/kandev#232 merged to main as 656086c4c9 (squash, branch deleted). Hide Windows discovery consoles (winproc.HideConsoleWindow on 8 probe sites) + agy child-only AGY_CLI_DISABLE_AUTO_UPDATE=true + isolated dev/mock default KANDEV_MOCK_AGENT=only with -RealAgents opt-in. Evidence: focused go tests pass, go vet pass, review PASS at fa8805d32d. Remaining: one before/after user-PATH isolated run needs approved entry outside .kandev (Operations-owned); Core_Manager .ps1 prompt rule handoff receipt pending (Operations/Core_Manager owner). Follow-up suggestion: none from this task.

W100 done: fork PR dreampiler/kandev#232 merged to main as 656086c4c9 (squash, branch deleted). Hide Windows discovery consoles (winproc.HideConsoleWindow on 8 probe sites) + agy child-only AGY_CLI_DISABLE_AUTO_UPDATE=true + isolated dev/mock default KANDEV_MOCK_AGENT=only with -RealAgents opt-in. Evidence: focused go tests pass, go vet pass, review PASS at fa8805d32d. Remaining: one before/after user-PATH isolated run needs approved entry outside .kandev (Operations-owned); Core_Manager .ps1 prompt rule handoff receipt pending (Operations/Core_Manager owner). Follow-up suggestion: none from this task.
Author
Owner

W100 PATH comparison done from approved TEST worktree kandev-wt-w100 at origin/main a5bc01453d (contains 656086c4c9). Mock-only dev-isolated run: backend PID 67788 on 127.0.0.1:48429 healthy 200, agentctl child PID 74092, mock-agent only. USER-PATH 23/23/23 equal at before/after/final, no Hermes entry added so nothing removed. Canonical kandev-kill pidfile teardown OK, owned home/run/pidfiles removed, C-AIWS operating processes untouched. Remaining: none for W100. CM prompt receipt stays with AIWS owner.

W100 PATH comparison done from approved TEST worktree kandev-wt-w100 at origin/main a5bc01453d (contains 656086c4c9). Mock-only dev-isolated run: backend PID 67788 on 127.0.0.1:48429 healthy 200, agentctl child PID 74092, mock-agent only. USER-PATH 23/23/23 equal at before/after/final, no Hermes entry added so nothing removed. Canonical kandev-kill pidfile teardown OK, owned home/run/pidfiles removed, C-AIWS operating processes untouched. Remaining: none for W100. CM prompt receipt stays with AIWS owner.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dreampiler/kandev#77