Skip to main content

Codex-safe Claude Code GLM-5.2 delegation wrappers.

Project description

Codex controls Claude Code

Language English Read in Japanese Version v0.0.3

ClaudeCodeGLM Supervisor

ClaudeCodeGLM Supervisor lets Codex delegate bounded implementation and review work to Claude Code while routing Claude Code to Z.AI GLM-5.2.

Codex stays responsible for planning, task design, risk control, validation, and final acceptance. Claude Code GLM-5.2 acts as a constrained worker that edits only the requested files, runs the requested checks, and returns a compact result for Codex to audit.

Install

The recommended install path is PyPI through uv.

One-off check:

uvx --from claude-glm52-supervisor claude-glm52 doctor --offline

Persistent CLI install:

uv tool install claude-glm52-supervisor
claude-glm52 setup --print

The GitHub Release installer is available for users who prefer a release-asset download. It verifies checksums before installing:

curl -fsSLO https://github.com/AkiGarage/ClaudeCodeGLM-supervisor/releases/latest/download/claude-glm52-installer.sh
bash claude-glm52-installer.sh --prefix "$HOME/.local"

Let Codex Set It Up

The fastest path is to ask Codex to do the environment checks and install steps for you. Copy the prompt in docs/codex-setup-prompt.md into a new Codex session.

The prompt tells Codex to:

  • install or upgrade claude-glm52-supervisor through uv
  • verify Python, Bash, Git, Claude Code, CLIProxyAPI, and optional timeout
  • create the isolated Claude Code worker config directory
  • avoid reading or printing secrets
  • run offline and online doctor checks
  • run a no-edit smoke test only when the local tools are ready
  • leave a short setup report with any remaining manual steps

Requirements

Required:

  • macOS or Linux shell environment
  • Python 3.11 or newer
  • Bash
  • Git
  • Claude Code CLI installed and authenticated
  • CLIProxyAPI installed and running locally
  • A Z.AI account/API key with GLM-5.2 access

Recommended:

  • uv for install and upgrades
  • rg for faster repository inspection
  • GNU timeout for runaway-task guards
  • a dedicated Claude Code worker config directory, usually ~/.claude-glm52-worker

Sensitive values are read from local environment or provider config at runtime. Do not commit API keys, .env files, auth tokens, provider configs, or shell history.

Setup Overview

  1. Install the supervisor CLI:

    uv tool install claude-glm52-supervisor
    claude-glm52 doctor --offline
    
  2. Install and authenticate Claude Code:

    claude --version
    
  3. Install and run CLIProxyAPI, then expose a local Anthropic-compatible endpoint such as:

    http://127.0.0.1:8317
    
  4. Configure CLIProxyAPI so the Claude Code-visible alias routes to GLM-5.2:

    claude-opus-4-6[1m] -> glm-5.2
    
  5. Use a dedicated worker config directory:

    export CLAUDE_GLM52_WORKER_CONFIG_DIR="$HOME/.claude-glm52-worker"
    mkdir -p "$CLAUDE_GLM52_WORKER_CONFIG_DIR"
    
  6. Run the setup guide and doctor:

    claude-glm52 setup --print
    claude-glm52 doctor
    

Basic Smoke Test

Run a no-edit review task before delegating real work:

claude-glm52-delegate \
  --role review \
  --cwd . \
  --timeout 120 \
  --retries 0 \
  --no-usage-log \
  --no-quota-snapshot \
  "Return exactly: ok. Do not edit files."

If this fails, check claude --version, confirm CLIProxyAPI is running, and run claude-glm52 doctor again.

Core Commands

Single task:

claude-glm52-delegate \
  --cwd /path/to/repo \
  --timeout 900 \
  --retries 1 \
  --prompt-file task-packet.md \
  --result-file delegate-result.json

Read-only review:

claude-glm52-delegate \
  --role review \
  --cwd /path/to/repo \
  --timeout 300 \
  --prompt-file review-packet.md \
  --result-file review-result.json

Independent batch work:

claude-glm52-batch \
  --plan-file batch-plan.json \
  --concurrency 2 \
  --result-file batch-result.json

Image-aware task:

claude-glm52-delegate \
  --cwd /path/to/repo \
  --image screenshots/error.png \
  --vision-backend mcp \
  --vision-mode auto \
  --prompt-file task-packet.md \
  --result-file delegate-result.json

The GLM-5.2 coding worker is treated as text-only. Image files are analyzed first through a lightweight Z.AI Vision MCP/OCR preflight. The extracted evidence text is injected into the task packet, while raw image summaries are not persisted in result JSON or usage logs.

Task Packet Shape

Use concise English packets unless the task itself is about Japanese text.

Role: implementation worker
Goal:
Repo/CWD:
Files likely relevant:
Allowed files:
Constraints:
Acceptance criteria:
Validation commands:
Do not:
Return:

Important constraints:

  • list the files the worker may modify
  • forbid broad searches from / or ~
  • forbid deleting files, editing secrets, committing, pushing, and changing auth/config
  • include the exact validation command when possible
  • keep final worker output short; large deliverables should be written to files

Verified Capabilities

Layer Route
Orchestrator Codex
Worker runtime Claude Code
Provider gateway CLIProxyAPI
Upstream model Z.AI GLM-5.2
Claude Code-visible model claude-opus-4-6[1m] alias
Verified context window 1,000,000 tokens
Verified Claude Code output ceiling 64,000 tokens
Vision handling Z.AI Vision MCP/OCR preflight, then text context injection

GLM-5.2 can support larger outputs at the model/API layer, but this Claude Code worker route is currently verified to a 64K Claude Code output ceiling. For a true 128K single-response output, use a separately verified direct GLM-5.2 route instead of assuming Claude Code will expose it safely.

More Docs

License

See LICENSE. The current notice is intentionally conservative and does not grant open-source reuse or redistribution rights.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_glm52_supervisor-0.0.3.tar.gz (60.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_glm52_supervisor-0.0.3-py3-none-any.whl (46.0 kB view details)

Uploaded Python 3

File details

Details for the file claude_glm52_supervisor-0.0.3.tar.gz.

File metadata

  • Download URL: claude_glm52_supervisor-0.0.3.tar.gz
  • Upload date:
  • Size: 60.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for claude_glm52_supervisor-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3fe02f3ffe817b2af2218f007cfafbe42bac33a70885d23fefc9666a511210ec
MD5 1a284aa33e53aa704fe73efee89dd65d
BLAKE2b-256 456638d82804782ce5980c160c29814c68d87193af1d50240232771ce10d7ab9

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_glm52_supervisor-0.0.3.tar.gz:

Publisher: release.yml on AkiGarage/ClaudeCodeGLM-supervisor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_glm52_supervisor-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_glm52_supervisor-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2c0759c37e07ddfb62b1b3a7112d6c61d4701a7a1be4a8bbb3bd1e8e357ff9b1
MD5 0f3b57c8cdf735073611824f615a49e4
BLAKE2b-256 3cabafa20ee087640cccd7b68440fbd1fcb4ce82ac75aea96c9ad1371796786d

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_glm52_supervisor-0.0.3-py3-none-any.whl:

Publisher: release.yml on AkiGarage/ClaudeCodeGLM-supervisor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page