Repository navigation
Run the picked Claude model for AI text generation - #37367
Conversation
Claude text generation used plan mode to stay read-only, and in plan mode the Claude CLI runs Sonnet for the haiku alias. Turn tools off and set the dontAsk permission mode instead, so every alias runs the picked model while text generation still cannot edit files or run tools. Tracked in STA-13412.
Text generation now gets Read, Grep and Glob under dontAsk instead of no tools, so saved prompts that read repo files keep working. Claude CLIs older than 2.0.43 refuse dontAsk; Orca retries once with the older syntax (default mode plus a fixed deny list of the other built-ins those versions have), never plan mode. The managed-MCP retry denies MCP tools, matching the strict attempt, which loads none.
dontAsk refuses Read outside the working directory unless the tools are also granted, so current CLIs now get --allowedTools Read,Grep,Glob beside --tools. The older-CLI retry grants the same tools as root-path rules (Read(//**) and so on); a bare grant there would override a user's path-specific ask rule.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
|
Review loop statusProblem. Picking Claude "Haiku" for AI text generation (commit message, PR details, branch name, chat name, Jira summary) ran Claude Sonnet. Orca started Claude in plan mode to keep it from editing files, and in plan mode the Claude CLI swaps What users get now. The model you pick is the model that runs. Claude can read and search files (inside or outside the checkout, subject to your own deny/ask rules) but can't run commands or edit anything, so saved custom prompts that read a file keep working. Older Claude CLIs (before 2.0.43) keep working through one retry in their older syntax, never plan mode. On company setups with a managed MCP config, current CLIs deny MCP tools on that retry. How review went. Full path, 3 review rounds plus a CI repair, two design-panel rulings.
Deferred / not in this PR.
Verified.
Not verified. A real enterprise managed-MCP machine, Bedrock/Vertex, and live Windows/WSL/SSH hosts (argv passes through unchanged). QA evidence: real Claude CLI 2.1.310 run through the team load balancer in throwaway homes, against the production For Brennan's review
|
Problem
Picking Claude "Haiku" for AI text generation (commit message, PR details, branch name, chat name, Jira summary) ran Claude Sonnet instead. You picked the fast, cheap model and got a slower, pricier one, with nothing in Orca saying so. On main you reach it through the setup guide's AI author card or
--model haikuin an action's Arguments.The cause: Orca kept Claude from editing files during text generation by starting it in plan mode (
--permission-mode plan). In plan mode the Claude CLI swaps thehaikualias for Sonnet (andopusplanfor Opus). Plan mode also made Claude write plan files into the Claude config folder whenever a prompt asked for an edit.Change
Claude text generation no longer uses plan mode, and the model you pick is the model that runs. What Claude may do while writing the text:
Model ids stay as the provider/account aliases, so Bedrock and Vertex keep resolving them as before. Tracked in STA-13412.
How it works
--tools Read,Grep,Glob --allowedTools Read,Grep,Glob --permission-mode dontAsk.--toolslimits the built-in tools to the three file tools,--allowedToolslets them read outside the checkout, anddontAskrefuses anything that would need approval. An explicit mode also overrides adefaultMode: "plan"in the user's settings.dontAskwithargument 'dontAsk' is invalid. On exactly that completed refusal Orca retries once with--disallowedTools <every other built-in those versions have> --allowedTools Read(//**),Grep(//**),Glob(//**) --permission-mode default.//**means any absolute path; those versions convert Windows paths to/c/...form before matching, so it covers every drive. The retry uses path rules rather than bare tool names because on those versions a bare grant would also override a user's "ask" rule for a specific path.--strict-mcp-configbecause the CLI refuses that flag there. That retry now also denies all MCP tools (mcp__*) on current CLIs, so it has the same tools as the normal attempt, which loads no MCP servers.CLAUDE_TEXT_GENERATION_TOOLSinsrc/shared/claude-background-run-isolation.ts; the catalog, the grants and the older-CLI deny list are all derived from it. The older-CLI list is fixed: it is every built-in tool name in the published CLIs that need the older syntax (1.0.69–2.0.42), and only those see it.Differences from the common pattern
--toolsplus a matching--allowedToolsunderdontAsk), without its shell commands.--tools/dontAskunconditionally and so needs Claude CLI 2.0.43 or later; Orca has no minimum Claude CLI version, and Haiku worked on older CLIs before this change. Older CLIs now also read files outside the checkout, so every supported version follows the same policy.dontAskalone lets a pre-approved MCP tool that changes things run (reproduced with a local MCP server); plan mode on main refused it.mcp__*wildcard), and their plan mode never refused pre-approved MCP tools either, so a company-approved MCP tool can still run there, as it could on main. Their built-in tools are still only Read, Grep and Glob.--disable-slash-commands: intended. The flag only exists from Claude CLI 2.0.60, while the current-syntax attempt serves 2.0.43 and later; adding it would need another older-CLI fallback.--no-session-persistence: temporary, tracked in STA-13454. Each text-generation run is still saved as a Claude session, exactly as on main.Behavior changes
opusplan, listed only when it is the user's own CLI model, now runs Sonnet. That is what it does outside plan mode.Evidence
Real Claude CLI, each run in its own throwaway home, signed in through the team load balancer, with
defaultMode: "plan", a Read deny rule and a Read ask rule for two outside files in the settings. The model was read from Claude's own transcript.haikuranclaude-sonnet-5-5; plan files were written.claude-haiku-5-5ran indontAsk; tools exactly Glob, Grep, Read; the inside file, an outside file and an outside Grep all worked; the denied and "ask" files were refused.//**root and Windows path handling were checked in the source of all 90 of those releases.dontAskwithout the MCP deny ran the writer (file written); withmcp__*denied no MCP tool was available and nothing was written.--mcp-config), Bedrock/Vertex (no such account), Windows/WSL/SSH hosts (argv passes through unchanged; no new characters that need quoting).