From 1a5c371892e79fdfb27cbac46dace394d843f31b Mon Sep 17 00:00:00 2001 From: Tym Rabchuk Date: Sun, 5 Apr 2026 19:59:40 -0400 Subject: [PATCH] Fix tri-* CLI invocation: pipe diff via stdin instead of CLI argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $(cat /tmp/diff.txt) as a CLI argument hits shell ARG_MAX on large diffs, producing empty output. Both Codex and Gemini support stdin: - Codex: stdin appended as block when prompt also provided - Gemini: stdin appended to -p prompt Changed to: cat diff.txt | codex/gemini -p "{prompt}" This was the root cause of empty Codex/Gemini output in tri-reviews this session — not a Gemini bug. --- commands/tri-review.md | 4 ++-- commands/tri-security.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/tri-review.md b/commands/tri-review.md index 9582890..b34c9a9 100644 --- a/commands/tri-review.md +++ b/commands/tri-review.md @@ -113,7 +113,7 @@ Retrieve result with `/codex:result` when done. Omit `--model` to use the accoun ```bash if [ "$HAS_CODEX_CLI" = "yes" ]; then - codex exec --full-auto "{prompt} $(cat /tmp/tri-review-diff.txt)" \ + cat /tmp/tri-review-diff.txt | codex exec --full-auto "{prompt}" \ > /tmp/tri-review-codex.txt 2>&1 & CODEX_PID=$! fi @@ -134,7 +134,7 @@ Retrieve result with `/gemini:result` when done. Omit `--model` to use the accou ```bash if [ "$HAS_GEMINI_CLI" = "yes" ]; then - gemini -p "{prompt} $(cat /tmp/tri-review-diff.txt)" \ + cat /tmp/tri-review-diff.txt | gemini -p "{prompt}" \ -y --output-format text \ > /tmp/tri-review-gemini.txt 2>&1 & GEMINI_PID=$! diff --git a/commands/tri-security.md b/commands/tri-security.md index 34eac78..41929a3 100644 --- a/commands/tri-security.md +++ b/commands/tri-security.md @@ -122,7 +122,7 @@ Retrieve result with `/gemini:result` when done. Omit `--model` to use the accou ```bash if [ "$HAS_GEMINI_CLI" = "yes" ]; then - gemini -p "{prompt} $(cat /tmp/tri-security-diff.txt)" -y \ + cat /tmp/tri-security-diff.txt | gemini -p "{prompt}" -y \ --output-format text > /tmp/tri-security-gemini.txt 2>&1 & fi