Skip to content

[Bug] Claude Code 接入报错405 #68

Closed

Description

@jayyeungchan

前置确认

  • 我已在最新版本上复现(master 或最新 Release)
  • 我已搜索过现有 issue(含已关闭的)
  • 我已用 serve debug 模式复现过一次并保留了日志
  • 我已确认粘贴内容里的 API key / JWT / proxy key 已脱敏

问题症状

其他(请在"补充说明"里描述)

一句话描述问题

Claude Code 跳用接口报错:{"code":3012,"msg":"request has been blocked due to unusual activity.","logid":"xxxxx"}

zcode-proxy 版本

4.8.3

运行方式

Bun 编译二进制(zcode-proxy.exe / linux-x64 / darwin-arm64 等)

操作系统

macOS (Apple Silicon)

Provider(上游服务商)

zai(Z.AI)

Plan(计费层级)

start-plan(zcode.z.ai 网关,JWT + captcha)

客户端请求格式

Anthropic(POST /v1/messages)

客户端类型 + 版本

Claude Code

使用的模型

glm-5.3

复现步骤

直接在Claude Code中使用

期望行为

返回200

实际行为

{"code":3012,"msg":"request has been blocked due to unusual activity.","logid":"xxxxx"}

serve debug 模式日志

{"code":3012,"msg":"request has been blocked due to unusual activity.","logid":"xxxxx"}

ZCODE_DUMP_UPSTREAM trace(强烈建议)

config.yaml 关键片段(脱敏)

是否使用了 clientIdentity(session affinity)?

None

这是首次出现还是偶发?

None

如果是回归,最后能正常工作的版本

No response

其他补充信息

我用脚本测试过,现在代理中的system字段是数组追加方式的,如下

system: [
  官方块 1,
  官方块 2,
  官方块 3,
  { Claude Code: "You are Claude Code..." },   ← 第 4 块
  { Claude Code: "..." }                        ← 可能更多
]

官方405检验现在是判断了system字段数组长度不能超过3个,所以我自己默认合并到了官方块 3中,如下

system: [
  官方块 1,                                  ← 原样
  官方块 2,                                  ← 原样
  官方块 3 + "\n\n" + Claude Code 的 system  ← 官方动态内容之后接上
]

Activity

  1. added
    bug
    on Oct 23, 2026
  2. TriDefender commented on Oct 23, 2026

    @TriDefender
    Owner

    新commit通过切换到subagent身份解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions