Skip to content

Windows: Large diffs fail due to 32KB CreateProcess command-line limit #266

@evgspacdmy

Description

@evgspacdmy

Problem

On Windows, roborev review fails on large commits because the diff + prompt is passed as command-line arguments to the agent subprocess. Windows CreateProcess has a hard 32,766 character limit on the command line.

This means any commit with a diff exceeding ~30KB (accounting for the prompt template) will fail with an error like:

The command line is too long

Environment

  • Windows 11 (10.0.26100)
  • roborev v0.31.1
  • Agent: opencode (but affects any agent)

Expected Behavior

Large diffs should be passed to the agent via stdin or a temporary file, not as command-line arguments.

Suggested Fix

Instead of:

agent.exe "Review this diff: <entire diff here>"

Use stdin piping:

echo <diff> | agent.exe "Review the diff from stdin"

Or a temp file:

agent.exe --input /tmp/roborev-diff-XXXX.txt "Review the diff"

Workaround

Using review_reasoning = "fast" reduces prompt size, but this is a band-aid. The fundamental issue is that diffs should not be passed via command-line arguments on any OS (Linux has a similar but higher limit at ~2MB via ARG_MAX).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions