Skip to content

Commit c51f689

Browse files
committed
debug-busybox: pass Copilot prompt via @file to avoid Windows
8 KB argv limit The first run at https://github.com/git-for-windows/MINGW-packages/actions/runs/26983788763/job/79628887416 hit "The command line is too long." instantly when invoking copilot.cmd because the rendered prompt is ~15 KB and the copilot.cmd npm shim funnels its non-interactive prompt through cmd.exe, whose per-command limit is around 8 KB on Windows. The shim turned the prompt into a single argv string and CreateProcess refused before Copilot ever started. Copilot CLI's @path syntax dereferences a file at prompt-evaluation time and inlines its contents as context rather than transporting them over argv, so a short literal "Follow the instructions in @copilot-prompt.md exactly." crosses the cmd.exe boundary cleanly and the actual instructions go in through the same channel Copilot already uses for codebase context. This works identically on Linux and macOS where the limit would not have hit, so no per-platform branching is needed. The substitution from envsubst (the previous step that produces copilot-prompt.md from the template) is preserved unchanged; only the way Copilot ingests that rendered file is different. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 1b56721 commit c51f689

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/debug-busybox.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,13 @@ jobs:
117117
MSYS2_PATH_TYPE: inherit
118118
CHERE_INVOKING: 1
119119
run: |
120-
prompt="$(cat copilot-prompt.md)" &&
121-
copilot.cmd -p "$prompt" --yolo </dev/null
120+
# Reference the rendered prompt with `@path` instead of
121+
# `-p "$(cat ...)"`: copilot.cmd funnels its argv through
122+
# cmd.exe whose 8 KB-per-command limit this prompt blows
123+
# past, producing "The command line is too long." before
124+
# Copilot ever starts.
125+
copilot.cmd -p "Follow the instructions in @copilot-prompt.md exactly." \
126+
--yolo </dev/null
122127
123128
- name: Archive Copilot session state
124129
if: always()

0 commit comments

Comments
 (0)