Skip to content

[Bug] ZCode: signed-in account without an active plan is reported as 需要登录 (login required) #620

Closed

Description

@ump45nose

Area

Harness Adapter

Summary

A ZCode Desktop account that is signed in but has no active plan is reported as 需要登录 / Login required ("请在所选 Host 上完成该 Harness 的登录或认证配置,然后重新检测连接。"). Users who only use ZCode's free quota hit this every time the quota runs out: the 5-day Start Plan trial, or event quotas such as the 1024 "鸡蛋" gift (500M tokens, 2026-10-23 23:00 to 2026-10-26 09:00 UTC+8). They then try to sign in again, which can't help, because the account is already signed in.

The cause is in packages/adapters/zcode/src/adapter.ts: inspect() returns authenticationRequired whenever the model catalog is empty. It does this whether ZCode Desktop is signed out or signed in without entitlement. accountConfig() already knows the difference (oauth:active_provider and zcodejwttoken are present, and the billing balance API answers 200 with plans: []), but that information never reaches inspect().

Expected behavior

  • Signed out of ZCode Desktop: keep authenticationRequired (需要登录).
  • Signed in, but no Start Plan or event quota, no Personal Coding Plan and no personal provider: report a distinct, non-login state that says the account has no available plan or models. For example, configurationRequired (需要配置) with a message about subscribing to GLM Coding Plan or adding a personal provider. This matches how omp reports "no models" (docs/architecture/harness-executable-discovery.md).

Actual behavior

ZCode shows 需要登录. Adapter result from the installed plugin (0.14.0), probed read-only on the affected Mac with tokens redacted:

FETCH GET https://zcode.z.ai/api/v1/zcode-plan/billing/balance 200 {"code":0,"msg":"","data":{"server_time":1792993687,"plans":[],"balances":[]},"logid":"<redacted>"}
STATUS unavailable authenticationRequired
MESSAGE ZCode has no available models. Connect Start Plan or Personal Coding Plan in ZCode Desktop, or add a personal provider, then re-detect ZCode. Team Coding Plan is not supported.

ZCode Desktop state at the same time (~/.zcode/v2): the credential keys oauth:active_provider (bigmodel), oauth:bigmodel:access_token, oauth:bigmodel:user_info and zcodejwttoken are present, and the selected model is coding-plan:builtin:bigmodel-start-plan. So the account is signed in. The free quota simply ended. Host logs show ZCode Turns working throughout the event window.

Reproduction

  1. Sign in to ZCode Desktop with a free account (no GLM Coding Plan subscription) whose Start Plan trial or event quota has expired, so zcode-plan/billing/balance returns plans: [].
  2. Don't configure a Personal Coding Plan API key or a personal provider.
  3. In codexhost, select ZCode and run the connection check.
  4. It shows 需要登录 even though ZCode Desktop is signed in.

codexhost version

0.14.0 (npm), also reproduced on main f7df52ed

Codex Desktop version

N/A: this is the Host connection check, reproduced directly with the adapter's inspect()

OS / Architecture

macOS 27.0.1 arm64

Installation

npm

Harness / Version

ZCode Desktop 3.16.3

Connection

Local

Redacted logs / Screenshots

See "Actual behavior" above.

Activity

  1. added a commit that references this issue on Oct 27, 2026
    693be7a
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions