Fix tri-* CLI: pipe diff via stdin instead of argument - #26
Merged
Conversation
$(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 <stdin> 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Change
$(cat /tmp/diff.txt)CLI arguments tocat diff.txt | command -p "{prompt}"for Codex and Gemini CLI fallbacks.Problem
Large diffs exceed shell
ARG_MAXwhen passed as command-line arguments, producing empty output. This was the root cause of empty Codex/Gemini results in tri-reviews — not a Gemini bug.Fix
Both CLIs support stdin:
<stdin>block"Files changed
commands/tri-review.md— Codex and Gemini CLI fallbackscommands/tri-security.md— Gemini CLI fallbackTest plan