Reviewer agent cannot follow the documented large-payload best practices - file handoff needs a write tool the sandbox forbids (5701 follow-up)

Author: axisrowCreated Sep 29, 2026Updated Sep 29, 2026

Related to #5701 and #6021 (tool-side follow-up). This issue is the documentation side of the same failure.

The documented best practice for large text payloads is file handoff

Every major CLI and agent framework routes large text through a file (or stdin fed from a file), never through a single inline argument:

  • GitHub CLI, gh pr create: -F, --body-file <file> — "Read body text from file (use "-" to read from standard input)" (gh manual)
  • Git, git commit: -F <file> — "Take the commit message from <file>. Use - to read the message from the standard input." (git-commit docs)
  • Anthropic, agent context engineering: "Structured note-taking — a technique where the agent regularly writes notes persisted to memory outside of the context window" (Effective context engineering for AI agents)

Coding models are trained on exactly this pattern: long content is written to a file with a write tool, and the payload-carrying command receives a pointer (--body-file, -F).

The divergence

The AO reviewer sandbox is deliberately read-only — Write/Edit are removed from the reviewer's toolset (reviewerDisallowedTools, since #5904). So the reviewer cannot perform the first half of the best practice: it cannot materialize the file that the --body-file / -F conventions require. The only sanctioned channel left is the exact anti-pattern those conventions exist to prevent: the entire multi-KB review inlined as one giant single-quoted shell argument (printf '%s' '<full markdown>' | ao review submit --body -).

Models trained on the file-handoff pattern predictably reach for it first (cat > /tmp/… <<'EOF'), find no write tool, fall back to the giant argument — and for models that cannot emit multi-KB single arguments, collapse into no-op loops (#5701: 300+ consecutive no-op calls; #6021: the PLACEHOLDER generation failure). The divergence between what the model was trained to do and what the sandbox allows is the fuel of the eternal loop.

Request

Document the divergence where the reviewer contract is specified, and treat it as a contract decision worth stating explicitly:

  • reviewer docs / the review prompt should state that the standard file-handoff pattern is intentionally unavailable in the reviewer sandbox, and why (read-only reviewer; publication is daemon-owned);
  • the intended replacement channel for large bodies should be named in the same place, so neither the model nor a reader of the docs is left to improvise toward the pattern they were trained on;
  • cross-link with #6021 so the tool-side fix and the documentation land together.

Acceptance

The reviewer contract docs state the divergence explicitly (no file handoff, why, and what to use instead), and a model following the documented best practice no longer silently dead-ends.

Source: Untrivial-ai/agent-orchestrator