fix: force opencode as sole worker CLI, remove OAuth routing to claude CLI#2173
fix: force opencode as sole worker CLI, remove OAuth routing to claude CLI#2173marcusquinn merged 1 commit intomainfrom
Conversation
…e CLI resolve_ai_cli() was routing Anthropic model tasks to the claude CLI when OAuth was detected, causing permission_denied_write_operations failures (t1165 family, t1300). The claude CLI sandbox blocks file creation even with bypassPermissions. OpenCode already supports Anthropic OAuth (subscription billing) so there is no cost benefit to the claude CLI routing. Additionally, the claude CLI has not been verified to load the full aidevops context chain (AGENTS.md, build.txt, subagents). Changes: - Remove SUPERVISOR_PREFER_OAUTH and OAuth-aware routing logic - OpenCode is now the only worker CLI (claude as last-resort fallback) - SUPERVISOR_CLI env var override preserved for explicit user requests - detect_claude_oauth() left as dead code (may be useful for future diagnostics)
Summary of ChangesHello @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 streamlines the AI CLI dispatch mechanism by designating Highlights
Changelog
Using Gemini Code AssistThe 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
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 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
|
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request simplifies the CLI resolution logic in the dispatcher by removing OAuth-aware routing and establishing a straightforward precedence: explicit SUPERVISOR_CLI override, then opencode if installed, finally claude as fallback. Documentation and error handling have been updated to reflect this simpler approach. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sun Feb 22 22:17:50 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
…tag t1165 family - t1107: verify t1094 parent scope — was stuck-evaluating, not done - t1108: audit 10 closed issues without PR linkage — never investigated - t1110: issue-sync PR linkage guard — mis-categorised as superseded - t1300: completed (root cause fixed in PR #2173) - t1165/t1165.1/t1165.2: retagged #auto-dispatch, removed blocker labels
There was a problem hiding this comment.
Code Review
This pull request simplifies the AI CLI resolution logic by making OpenCode the primary worker CLI and removing the complex OAuth-aware routing to the Claude CLI. This change addresses sandbox failures and permission issues encountered with the Claude CLI. The implementation correctly prioritizes user overrides via SUPERVISOR_CLI and provides a clear fallback path. I have a few suggestions regarding unused variables and ensuring the installation instructions in log messages use the correct package name.
| # Last-resort fallback only if opencode is not installed | ||
| if command -v claude &>/dev/null; then | ||
| log_warn "Using deprecated claude CLI fallback. Install opencode: npm i -g opencode" | ||
| log_warn "opencode not found, falling back to claude CLI. Install opencode: npm i -g opencode" |
There was a problem hiding this comment.
The package name for OpenCode was recently updated to opencode-ai (as noted in the changelog and setup.sh). The installation instruction in this warning message should be updated to reflect the correct package name to ensure users can install the tool successfully. Additionally, using the proper name 'OpenCode' improves clarity.
| log_warn "opencode not found, falling back to claude CLI. Install opencode: npm i -g opencode" | |
| log_warn "opencode not found, falling back to claude CLI. Install OpenCode: npm install -g opencode-ai" |
… CLI) 3 tests expected claude CLI for Anthropic models, but PR #2173 removed OAuth routing — opencode is now the sole worker CLI for all models. Updated test expectations to match current behavior. 70/70 tests pass.



Summary
SUPERVISOR_PREFER_OAUTHand OAuth-aware routing that sent Anthropic model tasks to theclaudeCLISUPERVISOR_CLIenv var override preserved for explicit user requestsWhy
bypassPermissions, causingpermission_denied_write_operationsfailures (t1165 family, t1300 — 4 tasks failed repeatedly)Files Changed
.agents/scripts/supervisor/dispatch.sh— simplifiedresolve_ai_cli()(+15/-37 lines)Resolves the root cause behind #1762, #1763, #1764, #2106
Summary by CodeRabbit
Refactor
Documentation