Skip to content

t1085: Fix --format text -> --format default for opencode run in AI reasoning#1642

Merged
marcusquinn merged 1 commit intomainfrom
bugfix/t1085-fix-opencode-format
Feb 18, 2026
Merged

t1085: Fix --format text -> --format default for opencode run in AI reasoning#1642
marcusquinn merged 1 commit intomainfrom
bugfix/t1085-fix-opencode-format

Conversation

@marcusquinn
Copy link
Owner

Summary

  • Fixes the root cause of 0-byte AI responses in Phase 14 reasoning
  • opencode run only accepts --format default or --format json--format text is invalid
  • With --format text, the CLI prints help text and exits with an error, which 2>/dev/null || echo "" silently swallows
  • This has been the cause of every AI reasoning cycle failing since Phase 14 was introduced

Evidence

10 consecutive reasoning cycles all show:

Response length: 0 bytes
Status: FAILED - no parseable JSON action plan

The context was being built correctly (15KB+), the prompt was being logged, but the AI CLI never actually ran.

Fix

One-character change: --format text--format default

Verification

Tested opencode run --format default manually — returns actual AI response. Tested opencode run --format text — prints help and exits.

opencode run only accepts --format default or --format json.
Using --format text caused the CLI to print help and exit with
an error, resulting in 0-byte AI responses for every reasoning
cycle. The prompt was being sent correctly (15KB+) but the
response was always empty because the command never ran.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 47 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/t1085-fix-opencode-format

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical bug that prevented AI reasoning cycles from completing successfully. By correcting a single command-line argument from --format text to --format default in the opencode run command, the change resolves silent failures that resulted in zero-byte AI responses, ensuring the proper execution of AI reasoning processes.

Highlights

  • Critical Bug Fix: Resolved the root cause of 0-byte AI responses during Phase 14 reasoning, which had been causing all AI reasoning cycles to fail since its introduction.
  • Command Argument Correction: Corrected an invalid command-line argument for opencode run, changing --format text to the valid --format default.
  • Silent Failure Remediation: Addressed the issue where the opencode run CLI would print help text and exit with an error due to the invalid argument, which was then silently swallowed by 2>/dev/null || echo "".
Changelog
  • .agents/scripts/supervisor/ai-reason.sh
    • Modified the opencode run command to use --format default instead of --format text.
Activity
  • The pull request author, marcusquinn, identified and fixed a critical bug causing AI reasoning failures.
  • Verification steps were performed by the author, confirming that opencode run --format default returns actual AI responses, while opencode run --format text prints help and exits.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 23 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 18 14:15:15 UTC 2026: Code review monitoring started
Wed Feb 18 14:15:15 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 23

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 23
  • VULNERABILITIES: 0

Generated on: Wed Feb 18 14:15:18 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly fixes a bug where an invalid --format argument was passed to the opencode run command, causing AI reasoning cycles to fail. While the fix is correct, the underlying issue of silent error handling remains. I've added a comment to address this by removing the error suppression (2>/dev/null), which will make the script more robust and easier to debug in the future, in alignment with the repository's style guide.

--format text \
--format default \
--title "ai-supervisor-${timestamp}" \
"$full_prompt" 2>/dev/null || echo "")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

As you noted in the PR description, 2>/dev/null here silently swallows errors, which was the root cause of this bug going undetected. This also violates the repository style guide which prohibits blanket error suppression.

To make future failures easier to diagnose, please remove the 2>/dev/null redirection. This will allow stderr from the failed command to be printed, while still preserving the behavior of setting ai_result to an empty string on failure.

Suggested change
"$full_prompt" 2>/dev/null || echo "")
"$full_prompt" || echo ""
References
  1. The style guide (line 50) prohibits blanket error suppression with 2>/dev/null. It is only acceptable when redirecting to a log file. (link)

@marcusquinn marcusquinn merged commit 2edaf1b into main Feb 18, 2026
14 of 15 checks passed
@marcusquinn marcusquinn deleted the bugfix/t1085-fix-opencode-format branch February 21, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant