diff --git a/commands/tri-debug.md b/commands/tri-debug.md index 8e5c32a..c5a4451 100644 --- a/commands/tri-debug.md +++ b/commands/tri-debug.md @@ -108,7 +108,7 @@ Retrieve result with `/gemini:result` when done. Omit `--model` to use the accou ```bash if [ "$HAS_GEMINI_CLI" = "yes" ]; then gemini -p "{prompt} {context}" -y \ - --output-format text > /tmp/tri-debug-gemini.txt 2>/dev/null & + --output-format text > /tmp/tri-debug-gemini.txt 2>&1 & GEMINI_PID=$! fi diff --git a/commands/tri-dispatch.md b/commands/tri-dispatch.md index 8d066a9..0616120 100644 --- a/commands/tri-dispatch.md +++ b/commands/tri-dispatch.md @@ -86,7 +86,7 @@ Retrieve result with `/gemini:result` when done. Omit `--model` to use the accou ```bash if [ "$HAS_GEMINI_CLI" = "yes" ]; then gemini -p "$PROMPT" -y \ - --output-format text > /tmp/tri-dispatch-gemini.txt 2>/dev/null & + --output-format text > /tmp/tri-dispatch-gemini.txt 2>&1 & fi wait diff --git a/commands/tri-review.md b/commands/tri-review.md index d1f5c7f..9582890 100644 --- a/commands/tri-review.md +++ b/commands/tri-review.md @@ -114,7 +114,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)" \ - > /tmp/tri-review-codex.txt 2>/dev/null & + > /tmp/tri-review-codex.txt 2>&1 & CODEX_PID=$! fi ``` @@ -136,7 +136,7 @@ Retrieve result with `/gemini:result` when done. Omit `--model` to use the accou if [ "$HAS_GEMINI_CLI" = "yes" ]; then gemini -p "{prompt} $(cat /tmp/tri-review-diff.txt)" \ -y --output-format text \ - > /tmp/tri-review-gemini.txt 2>/dev/null & + > /tmp/tri-review-gemini.txt 2>&1 & GEMINI_PID=$! fi @@ -145,6 +145,21 @@ wait Note: Gemini CLI defaults to the best available model. Don't hardcode a model name — it may not be available on all accounts. +### Post-dispatch validation + +After `wait`, check each CLI output file. If empty, report the failure instead of silently dropping the agent: + +```bash +for agent_file in /tmp/tri-review-codex.txt /tmp/tri-review-gemini.txt; do + if [ -f "$agent_file" ] && [ ! -s "$agent_file" ]; then + agent=$(basename "$agent_file" | sed 's/tri-review-//;s/\.txt//') + echo "WARNING: $agent produced empty output — check CLI installation and authentication" + fi +done +``` + +If an agent's output contains only stderr (error messages, not review content), note it in the consolidation as a failure rather than omitting it silently. + ## Autonomy Flags | Agent | Method | Flags | diff --git a/commands/tri-security.md b/commands/tri-security.md index 852b16e..34eac78 100644 --- a/commands/tri-security.md +++ b/commands/tri-security.md @@ -123,7 +123,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 \ - --output-format text > /tmp/tri-security-gemini.txt 2>/dev/null & + --output-format text > /tmp/tri-security-gemini.txt 2>&1 & fi wait diff --git a/commands/tri-test-gen.md b/commands/tri-test-gen.md index 2f40b90..98dd405 100644 --- a/commands/tri-test-gen.md +++ b/commands/tri-test-gen.md @@ -102,7 +102,7 @@ Retrieve result with `/gemini:result` when done. Omit `--model` to use the accou ```bash if [ "$HAS_GEMINI_CLI" = "yes" ]; then gemini -p "{prompt} {source_code}" -y \ - --output-format text > /tmp/tri-test-gemini.txt 2>/dev/null & + --output-format text > /tmp/tri-test-gemini.txt 2>&1 & fi wait