ZCode is Z.AI’s Agentic Development Environment (ADE) built for long-horizon tasks β€” think of it as the GLM equivalent of Claude Code. It helps AI agents complete multi-step development work end-to-end with stability and control.

Model

ZCode supports the full GLM family, including GLM-5.2 with its 1M context window for large codebases and long documents.

Why ZCode?

  • Long-task execution: Keeps requirements, planning, code changes, verification, and review inside the same task
  • Stable context retention: Combines files, terminal output, browser context, execution modes, and Git state
  • Multi-device continuity: Desktop, mobile Remote, and Feishu/WeChat Bot can all keep the same task moving
  • Safe execution: Sensitive commands and file changes require confirmation before running

Installation

Download ZCode from the official site:

  • macOS
  • Windows
  • Linux (beta)

API Configuration

ZCode uses our group’s Sub2API gateway for AI models (GLM and DeepSeek). See Model API Setup (Sub2API) for detailed instructions on getting your API key and configuring models.

Quick Configuration

After getting your API key from the Sub2API portal, configure ZCode settings:

Base URL: https://claude.matsci.dev
API Key: YOUR-API-KEY-HERE
Model: glm-5.2

Note

The same Sub2API key works for both Claude Code and ZCode.

See the Model API Setup page for the full model table and HPC network tunneling instructions.

Remote SSH Connections

ZCode can work directly on remote servers via SSH β€” useful for HPC clusters like Fornax or lab machines. See Model API Setup for SSH tunneling instructions if the remote server cannot reach claude.matsci.dev.

Adding an SSH Connection

In ZCode, go to Settings β†’ Remote β†’ Add SSH Connection and provide:

  • Host: USERNAME@fornax.nus.edu.sg (or your target server)
  • Port: 22 (default)
  • Authentication method: SSH key (recommended) or password
  • Working directory: Your project folder on the remote machine

SSH Key Setup

For passwordless SSH (recommended):

# Generate an SSH key on your local machine (if you don't have one)
ssh-keygen -t ed25519 -C "your-email@example.com"
 
# Copy the public key to the remote server
ssh-copy-id USERNAME@fornax.nus.edu.sg
 
# Test the connection
ssh USERNAME@fornax.nus.edu.sg

Working with Remote Projects

Once connected, you can:

  • Open remote files in ZCode
  • Run terminal commands on the remote server
  • Use AI to edit and test code in place
  • Deploy changes directly to the remote environment

Core Workflows

Planning β†’ Coding β†’ Review

ZCode organizes tasks around a continuous workflow:

  1. Plan: ZCode analyzes your codebase and proposes a plan
  2. Execute: Make changes with confirmation at each step
  3. Review: ZCode reviews its own changes and catches regressions

Multi-Agent Collaboration

For complex tasks, ZCode can:

  • Spawn specialized agents for different subtasks
  • Coordinate work across multiple files or repos
  • Aggregate results from parallel exploration

Mobile Control

Through Feishu/WeChat Bot or mobile Remote, you can:

  • Check progress on long-running tasks
  • Add new instructions while work continues
  • Review and approve changes from your phone

Best Practices

Project Context

  • Create a ZCODE.md or similar file in your project root for AI context
  • Provide clear, specific instructions
  • Use natural language to describe goals and constraints

Safe Execution

  • Review terminal commands before approving
  • Check file changes before committing
  • Use version control to track AI-generated changes

Long-Running Tasks

  • Break large tasks into milestones
  • Use the bot or remote control to monitor progress
  • Add follow-up instructions as work evolves

Security

  • API credentials are provided by the computer officer for group members
  • Store environment variables securely and never share them
  • Do not commit credentials or SSH keys to version control
  • Always review AI-generated code before deploying to production

References