Skip to content

Kimi K3 works as primary but OpenCode Go rejects subagent requests with 400 #37552

Description

@mihneaptu

Description

Using opencode-go/kimi-k3 through OpenCode Go works when selected for the primary agent, but fails immediately when the same model is invoked as a subagent through task.

I have been using the Sidekick agent from mihneaptu/opencode-fusion. I also reproduced this with that repository's Design agent. They are regular agent Markdown definitions with different permission/tool sets.

The child session records this response:

HTTP 400 invalid_request_error
Error from provider (Console Go): Upstream request failed
isRetryable: false
endpoint: https://opencode.ai/zen/go/v1/chat/completions

Test matrix:

Invocation Variant Result
Kimi K3 as primary/default chat default Pass
Kimi K3 as primary/default chat max Pass
Kimi K3 as Sidekick subagent default Fail: HTTP 400
Kimi K3 as Sidekick subagent max Fail: HTTP 400
Kimi K3 as Design subagent max Fail: HTTP 400

On subagent failure, the primary agent receives an empty task response because the child session ends on the provider error.

This appears related to #31580 and #37496, possibly because a tool schema present in the subagent request is rejected by Kimi/Moonshot. The Console Go response currently hides the underlying upstream validation detail.

Plugins

None. Custom Sidekick/Design agent definitions from mihneaptu/opencode-fusion (not an OpenCode plugin).

OpenCode version

1.18.3

Steps to reproduce

  1. Configure a subagent with "model": "opencode-go/kimi-k3" and "variant": "max".
  2. From a primary agent, use the task tool to delegate a harmless no-file task to that subagent.
  3. Observe that the child returns an empty response and its session logs HTTP 400: Error from provider (Console Go): Upstream request failed.
  4. Remove the variant and repeat; the subagent still fails.
  5. Run the same model directly as primary with opencode run --model opencode-go/kimi-k3 --variant max "Reply with OK"; it succeeds.
  6. Repeat delegation with another subagent definition (Design); it fails with the same 400.

Screenshot and/or share link

Image

Operating System

Microsoft Windows 11 Pro 10.0.26200 (build 26200)

Terminal

Git Bash; also reproduced with opencode run from PowerShell

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions