From 812181e6043e3060b18e4f1246e8394077cbe6e1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 10:02:12 +0000 Subject: [PATCH 1/2] Initial plan From d8140d81b072a41ebd27660aa1491be5afd6a717 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 10:11:00 +0000 Subject: [PATCH 2/2] Port upstream PR #329: hide CLI console window on Windows Add explicit PIPE redirect configuration to ProcessBuilder in spawn-cli, ensuring the JVM sets CREATE_NO_WINDOW on Windows. This prevents a console window from appearing when spawning the CLI from GUI applications. The JVM's ProcessImpl already uses CREATE_NO_WINDOW when all stdio handles are pipes (not inherited from parent console). Making the PIPE redirects explicit documents this intent and protects against regressions. Co-authored-by: krukow <3635+krukow@users.noreply.github.com> --- CHANGELOG.md | 3 +++ src/github/copilot_sdk/process.clj | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c541c6a..31391e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. This change ## [Unreleased] +### Added (upstream PR #329 sync) +- Windows console window hiding: CLI process is spawned with explicit PIPE redirects ensuring the JVM sets `CREATE_NO_WINDOW` on Windows — no console window appears in GUI applications. Equivalent to upstream `windowsHide: true` (upstream PR #329). + ### Changed - Recommended default model for non-streaming examples is `claude-haiku-4.5` instead of `gpt-5.2` for faster response times diff --git a/src/github/copilot_sdk/process.clj b/src/github/copilot_sdk/process.clj index 220b76b..251d497 100644 --- a/src/github/copilot_sdk/process.clj +++ b/src/github/copilot_sdk/process.clj @@ -68,7 +68,14 @@ (when github-token (.put env-map "COPILOT_SDK_AUTH_TOKEN" github-token))) - ;; Configure stdio + ;; Configure stdio — use explicit PIPE redirects for all three streams. + ;; On Windows, the JVM's ProcessImpl sets CREATE_NO_WINDOW when none of the + ;; child's stdio handles are inherited from the parent console. By ensuring + ;; PIPE (not INHERIT) for stdin, stdout, and stderr, we guarantee no + ;; console window appears — equivalent to upstream windowsHide: true (PR #329). + (.redirectInput builder ProcessBuilder$Redirect/PIPE) + (.redirectOutput builder ProcessBuilder$Redirect/PIPE) + (.redirectError builder ProcessBuilder$Redirect/PIPE) (.redirectErrorStream builder false) (let [process (.start builder)