Skip to content

acp:* agent steps fail on Windows when prompt exceeds CLI length (truncates at Workspace boundary) #315

Description

@Vtoryvn

Upstream issue draft: Windows ACP prompt truncation (acp:cursor)

Target repo: https://github.com/kunchenguid/no-mistakes
File when ready: gh issue create --repo kunchenguid/no-mistakes --title "..." --body-file ...


Title

acp:* agent steps fail on Windows when review/document prompt exceeds CLI length (truncates at "Workspace boundary")

Summary

On Windows, pipeline steps that invoke agent: acp:cursor (via acpx) fail during review, document, and sometimes PR content generation with:

acp:cursor output parse: invalid character 'Y' looking for beginning of value

The Cursor agent (via ACP) receives a truncated prompt that ends at the line Workspace boundary (important): and responds in plain prose (Your message looks cut off...) instead of the JSON object no-mistakes expects.

Short prompts work; large prompts (diff + workspace preamble + JSON schema) do not.

Environment

Component Version
OS Windows 10 (win32 10.0.19045)
no-mistakes v1.30.1 (59dfa25)
acpx 0.11.0
Cursor CLI (agent) 2026.05.28-a70ca7c
Gate agent config agent: acp:cursor
# ~/.no-mistakes/config.yaml
agent: acp:cursor
acpx_path: C:/Users/ADMIN/AppData/Roaming/npm/acpx.cmd
# .no-mistakes.yaml (repo)
agent: acp:cursor
// .acpxrc.json (repo)
{ "agents": { "cursor": { "command": "agent", "args": ["acp"] } } }

agent status → logged in. acpx --format json cursor exec "Reply with exactly: acp-ok"success.

Steps to reproduce

  1. no-mistakes init on a repo with a non-trivial diff vs main
  2. Set agent: acp:cursor (global and/or repo config); install acpx and Cursor CLI
  3. git push no-mistakes <feature-branch> (do not skip review)
  4. Observe review step failure

Expected

Review/document agents receive the full prompt (workspace boundary + diff + JSON schema) and return parseable JSON.

Actual

Review log (~/.no-mistakes/logs/<run-id>/review.log):

reviewing changes...

Your message looks cut off — it ends at **"Workspace boundary (important):"** with nothing after the colon.
...
error: agent review: acp:cursor output parse: invalid character 'Y' looking for beginning of value

Same pattern on document step. test and lint (shell commands, no ACP agent) pass.

Root cause (suspected)

internal/agent/acpx.go builds:

args = append(args, "exec", prompt)

The entire prompt (including appended JSON schema via buildACPStructuredPrompt) is passed as a command-line argument. On Windows, CreateProcess command lines are limited to ~8191 characters. Truncation appears to cut exactly at the Workspace boundary (important): header — the last segment before the substantive review instructions and diff.

Native agents (e.g. Claude/Codex subprocess with stdin or separate schema flags) may not hit this limit; ACP via acpx exec <prompt> does.

Suggested fix

On Windows (or universally), avoid passing large prompts as CLI arguments:

  1. Write prompt to a temp file and invoke acpx ... exec -f <file> (acpx supports --file / -f on exec), or
  2. Pipe prompt on stdin if acpx supports it, or
  3. Add an acpx flag for structured prompts above a size threshold

Workaround (today)

git push -o no-mistakes.skip=review,document no-mistakes HEAD

Shell steps (test, lint, push, PR, CI) still run; only agent-driven review/document are skipped.

References

Reporter

PegasusTech / @Vtoryvn — using Cursor CLI as the only gate agent (not Claude/Codex).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions