[Bug] ZCode 3.1.6 (macOS, Apple Silicon) unusable via every entry point: desktop EPIPE + blank renderer; CLI missing @zcode/tui; CLI login "OAuth response is not valid JSON" (model & plan are fine)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
稳定性 / 崩溃 · Stability / Crash
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
阻塞使用 · Blocking (无法使用核心功能 / core function unusable)
复现频率 · Reproducibility
必现 · Always
问题描述 · Description
Paid GLM Coding Lite subscriber. GLM-5.2 and the plan are healthy, but ZCode 3.1.6 fails through EVERY entry point — desktop GUI AND terminal CLI. 4 distinct, reproducible bugs:
- Desktop:
write EPIPEon long / webReader tasks; work is lost; EPIPE is not retried. - Desktop: blank/black renderer, even after a clean restart.
- CLI (TUI): missing package
@zcode/tui(absent from the entire install). - CLI login:
OAuth response is not valid JSON(instant failure).
This is NOT quota / account / network / model: a direct call to the Anthropic-compatible endpoint returns HTTP 200, a long streaming reply completes cleanly with no EPIPE, the plan shows as "available", and quota is 96% (5h) / 99% (weekly) free. So the failures are inside the ZCode client / distribution. (Full evidence + IDs in the Logs field below.)
复现步骤 · Steps to reproduce
A) CLI login (clearest — instant):
- In Terminal, run: node "/Applications/ZCode.app/Contents/Resources/glm/zcode.cjs" login
- It fails immediately with: "Error: OAuth response is not valid JSON" (same with --no-browser; no browser ever opens).
B) CLI TUI:
- Run the CLI with no arguments (i.e. open the TUI).
- It fails with: "Cannot find package '@zcode/tui'".
C) Desktop EPIPE + blank renderer:
- Start a long task with webReader / high context (GLM-5.2) in the desktop app.
- After a while it dies with "Cannot connect to API: write EPIPE"; nothing is saved to disk.
- Reopen that conversation, or fully restart the app: the window stays blank and never renders the UI.
期望表现 · Expected behavior
- Desktop runs long tasks without aborting (retry on transient socket close), and renders the UI after a restart.
- The CLI TUI starts (the @zcode/tui package should be shipped in the distribution).
zcode logincompletes the OAuth flow successfully.
实际表现 · Actual behavior
- Desktop: "Cannot connect to API: write EPIPE" (provider=builtin:zai-coding-plan, provider_code=EPIPE, retriable=false) on GLM-5.2 AND GLM-5-Turbo; sometimes shows "Worked for 0s"; unsaved work is lost. The window then stays blank/black after restart.
- CLI (TUI): Error: Cannot find package '@zcode/tui' imported from /Applications/ZCode.app/Contents/Resources/glm/zcode.cjs
- CLI login: Error: OAuth response is not valid JSON — instant, in a real TTY, repeated, never opens a browser. Because login fails, headless --prompt then fails with: "Model config is missing. Create ~/.zcode/cli/config.json ...".
ZCode 版本 · ZCode version
3.1.6 (desktop app); CLI bundle zcode.cjs 0.14.9
设备 / 系统 / 浏览器 · Device / OS / Browser
MacBook Air, Apple Silicon (arm64), macOS
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
Reference identifiers (one failing session):
TraceID: 4ec84c28-5e2a-4537-b7f0-241d2419bf43
Request ID: 0b40c9a9-1876-489e-bfb9-29cfc223ef51
Evidence it is client-side (NOT model / plan / network):
- Direct POST https://api.z.ai/api/anthropic/v1/messages (glm-5.2) -> HTTP 200.
- A long streaming (SSE) reply (2000 tokens, ~255KB, ~42s) completed cleanly to message_stop, curl exit 0, no EPIPE.
- coding-plan-cache.json: builtin:zai-coding-plan = "available"; quota 5h 96% / weekly 99% free.
@zcode/tui verified ABSENT from the whole install: not in glm/packages, not in app.asar, not in app.asar.unpacked, no node_modules next to the bundle.
Account email available privately on request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the CLI login and TUI failures from /Applications/ZCode.app/Contents/Resources/glm/zcode.cjs, then compare the reported package paths in glm/packages, app.asar, and app.asar.unpacked. Reproduce the desktop EPIPE and blank renderer separately using the supplied trace and request IDs. Done means the desktop survives long tasks and renders after restart, the TUI starts, and login completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, node.js
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100