Skip to content

Commit 5e066ac

Browse files
authored
fix(core): disable Claude Agents non-streaming fallback (#61067)
1 parent 69269e4 commit 5e066ac

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/core/src/plugin/provider/claude-agent/claude/query-options.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const ISOLATION_ENV = {
1515
CLAUDE_CODE_ENABLE_AWAY_SUMMARY: "0",
1616
ENABLE_TOOL_SEARCH: "false",
1717
CLAUDE_CODE_DISABLE_ADVISOR_TOOL: "1",
18+
CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: "1",
1819
// Raised so opencode's own truncation applies instead
1920
MAX_MCP_OUTPUT_TOKENS: "200000",
2021
// Skips OAuth, so the subscription would not be used

‎specs/v2/claude-agent-provider.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Claude Code reads none of the user's Claude settings. The plugin passes every se
5252
- Away summaries. Claude Code writes a recap when you come back to an idle terminal session. Opencode does not do this.
5353
- 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.
5454
- 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.
55+
- The non-streaming fallback. When a stream fails partway, Claude Code retries without streaming, and opencode would hang waiting for the step to end.
5556

5657
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.
5758

0 commit comments

Comments
 (0)