Too small ARG_MAX value for command line parameter length #14658

Open
opened 2026-01-31 04:16:07 +00:00 by claunia · 0 comments
Owner

Originally created by @Okeanos on GitHub (Jul 23, 2021).

Description of the new feature/enhancement

The Windows Terminal (probably conhost) command line parameter length and number are severely limited. As far as I can currently tell on a reasonably up to date Windows 10 version the ARG_MAX value, i.e maximum number of bytes that a single command may consume at once during invocation is limited to 32000 bytes. Some additional details around that here and here.

Other platforms have much higher limits that make working with large arguments/argument lists way easier. A particular instance where this is a particular problem on Windows (but generally everywhere at some point) is when one wants to use govc to manipulate vSphere VMs (vmware/govmomi/issues/2488).

This may not be the exact right place for this request but may be a core issue of the Windows platform? Sorry in that case but maybe you can forward this request ;-)

Proposed technical implementation details (optional)

I would want the limit raised to a larger reasonable default, probably at a minimum to what macOS (262144 bytes) also supports for consistency across various platforms.

Originally created by @Okeanos on GitHub (Jul 23, 2021). # Description of the new feature/enhancement The Windows Terminal (probably conhost) command line parameter length and number are severely limited. As far as I can currently tell on a reasonably up to date Windows 10 version the `ARG_MAX` value, i.e maximum number of bytes that a single command may consume at once during invocation is limited to `32000 bytes`. Some additional details around that [here](https://devblogs.microsoft.com/oldnewthing/20031210-00/?p=41553) and [here](https://www.in-ulm.de/~mascheck/various/argmax/). Other platforms have much higher limits that make working with large arguments/argument lists way easier. A particular instance where this is a particular problem on Windows (but generally everywhere at some point) is when one wants to use [govc](https://github.com/vmware/govmomi/tree/master/govc) to manipulate vSphere VMs (vmware/govmomi/issues/2488). This may not be the exact right place for this request but may be a core issue of the Windows platform? Sorry in that case but maybe you can forward this request ;-) # Proposed technical implementation details (optional) I would want the limit raised to a larger reasonable default, probably at a minimum to what macOS (`262144 bytes`) also supports for consistency across various platforms.
claunia added the Issue-FeatureProduct-ConhostNeeds-TriageNeeds-Tag-FixzInbox-Bug labels 2026-01-31 04:16:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14658