Fix Windows 32KB command-line limit for agent prompts#269
Open
Conversation
Four agents (copilot, cursor, droid, opencode) passed prompts as CLI arguments, which hits the 32,766-char CreateProcess limit on Windows. Switch all four to stdin piping. Also switch gh pr comment from --body to --body-file - for the same reason. Add --large-prompt flag to check-agents for validating the fix with a 33KB+ prompt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cursor CLI does not support stdin piping — revert to positional arg. Add cmd.WaitDelay = 5s to all agents that use StdoutPipe (claude, codex, cursor, gemini). When CommandContext kills a process, child processes can keep stdout pipes open, causing pipe reads to block forever. WaitDelay (Go 1.20+) force-closes pipes after the grace period, preventing the hang observed with gemini under --large-prompt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cursor CLI does support stdin when no positional arg is given. The earlier revert was based on a stale binary that hadn't been rebuilt after the initial stdin change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0fc5144 to
ca7299f
Compare
roborev: Combined ReviewVerdict: Changes are directionally good, but there are 3 Medium-severity issues to address before merge. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: Changes are mostly positive, but there are 2 Medium-severity functional regressions to address before merge. Medium
Notes
Synthesized from 4 reviews (agents: gemini, codex | types: security, default) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CreateProcess32,766-character limitgh pr commentfrom--bodyto--body-file -with stdin piping for the same reasoncmd.WaitDelay = 5sto all pipe-based agents (claude, codex, cursor, gemini) so context cancellation reliably terminates pipe reads when child processes outlive the parent--large-promptflag tocheck-agentsfor validating the fix with a 33KB+ promptTest plan
go test ./...passesroborev check-agents— all agents passroborev check-agents --large-prompt— agents that support large prompts passCloses #266
🤖 Generated with Claude Code