mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 17:01:37 +03:00
fix(core): disable Claude Agents refusal fallback (#61069)
This commit is contained in:
@@ -16,6 +16,7 @@ const ISOLATION_ENV = {
|
||||
ENABLE_TOOL_SEARCH: "false",
|
||||
CLAUDE_CODE_DISABLE_ADVISOR_TOOL: "1",
|
||||
CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: "1",
|
||||
CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK: "1",
|
||||
// Raised so opencode's own truncation applies instead
|
||||
MAX_MCP_OUTPUT_TOKENS: "200000",
|
||||
// Skips OAuth, so the subscription would not be used
|
||||
|
||||
@@ -53,6 +53,7 @@ Claude Code reads none of the user's Claude settings. The plugin passes every se
|
||||
- Tool search. Claude Code hides MCP tools until Claude searches for them. All of opencode's tools reach Claude as MCP tools, so this would hide every one of them. Opencode also has native tool deferral through codemode for normal MCPs.
|
||||
- The advisor tool. Claude can ask a stronger model for advice in the middle of a task, using the user's plan. opencode could not show or control these calls.
|
||||
- The non-streaming fallback. When a stream fails partway, Claude Code retries without streaming, and opencode would hang waiting for the step to end.
|
||||
- The refusal fallback. When a safety classifier flags a request, Claude Code switches the session to another model, so the model running would no longer match the one picked in opencode.
|
||||
|
||||
We also clear three variables a user might have set in their shell. `CLAUDE_CODE_SIMPLE` would skip the subscription login. `CLAUDE_CODE_EFFORT_LEVEL` would override the effort chosen in opencode. `MCP_TOOL_TIMEOUT` would cap every opencode tool call, failing subagents and permission prompts that run longer.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user