Skip to main content

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.

Release files for claude-glm52-supervisor 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-glm52-supervisor 0.0.3
File Size Uploaded
claude_glm52_supervisor-0.0.3.tar.gz 60.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-glm52-supervisor 0.0.3
File Interpreter ABI Platform
claude_glm52_supervisor-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 106.4 kB

Release files / claude_glm52_supervisor-0.0.3.tar.gz

Download URL claude_glm52_supervisor-0.0.3.tar.gz
Size 60.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3fe02f3ffe817b2af2218f007cfafbe42bac33a70885d23fefc9666a511210ec
BLAKE2b-256 checksum
How to use checksums
456638d82804782ce5980c160c29814c68d87193af1d50240232771ce10d7ab9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.

Transparency log

Release files / claude_glm52_supervisor-0.0.3-py3-none-any.whl

Download URL claude_glm52_supervisor-0.0.3-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c0759c37e07ddfb62b1b3a7112d6c61d4701a7a1be4a8bbb3bd1e8e357ff9b1
BLAKE2b-256 checksum
How to use checksums
3cabafa20ee087640cccd7b68440fbd1fcb4ce82ac75aea96c9ad1371796786d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page