coderio
中文 | English
The agent claims "done" without running the tests? coderio's harness stops it. A local coding agent with native Zhipu GLM & StepFun Step coding-plan support — four-tier permissions, layered sandbox, MCP, lifecycle hooks, and an interactive TUI.
Install
pip install coderio
coderio # onboarding wizard on first launch (pick provider, paste API key, auto context-window probe)
Requires Python 3.11+; Git Bash on Windows. Linux / macOS supported.
Why coderio
The shared weakness of coding agents: the model says "I'm done" and you just have to trust it. coderio turns that sentence into a structural constraint—
The Four Gates: the agent can't lie to you
| Gate | Behavior |
|---|---|
| VerifyGate | Wrote code, never ran it, wants to finish → intercepted, forced to continue. Parses real exit codes — a failing test run does NOT count as verified |
| CompletionGate | Declares done with pending todos → intercepted |
| GroundingGate | Cites files it never read → intercepted |
| PlanGate | Writes code without a todo list → soft nudge |
Not a prompt-level soft rule — a system-level control based on tool-call ground truth. Claude Code and Codex don't have this.
Native Chinese coding-plan support
Zhipu GLM Coding Plan and StepFun Step Plan work out of the box (direct Anthropic-protocol connection) — your subscription quota runs a local agent, no proxies, no middle layer. Also supports OpenAI / Anthropic / Ollama / any OpenAI-compatible endpoint, with multi-profile switching.
Layered security, honestly stated
- Four permission tiers (plan read-only / confirm per-action / auto_edit / full)
- Command blacklist + whitelist (accident prevention); Linux bubblewrap OS sandbox (boundary enforcement)
- First-use repo-config trust confirmation (hostile-repo protection); web_fetch SSRF protection
- The blacklist/whitelist are accident prevention, not adversarial defense — adversarial protection comes from the sandbox + permissions; use a VM for hostile code
Feature highlights
- Interactive TUI: streaming output, foldable thinking (Ctrl+O), collapsible TODO panel, vertical permission menu, task interruption (Esc), slash-command autocomplete, session management
- Custom slash commands:
.coderio/commands/*.md(project/user layers) turn prompt templates into/commandswith$ARGUMENTSsubstitution; built-ins can never be shadowed - Custom subagents:
.coderio/agents/*.mddefine personas invokable viatask(subagent_type=...)— you customize WHO the agent is, its capabilities stay on the read-only stack - File rollback: every structured agent write is auto-checkpointed;
/undoreverts step by step (a bad edit is one command from gone) - Plan artifact: the task list auto-mirrors to
.coderio/plan.md; edit it by hand and the agent adopts your version at the next turn - Headless mode:
coderio run "task"one-shot execution (CI / scripts / benchmarks) with graded exit codes - MCP support: connect external tools via
.mcp.json(Claude Code-compatible format), managed withcoderio mcp - Lifecycle hooks:
[[hooks]]run your commands at PreToolUse / PostToolUse / UserPromptSubmit (exit 2 = block) — IO contract compatible with Claude Code - Three-layer skills: bundled + user + project, progressive disclosure saves context
- Context governance: auto-compaction (60% window trigger), large-block offload, sqlite checkpoints across turns
- Subagents: research (read-only, double-enforced) + general-purpose (inherits the main agent's full security stack)
- Engineering discipline: 950+ tests, 82% coverage (CI floor 75%), mypy hard gate, uv.lock, 3 OS × 2 Python CI matrix
Config example (click to expand)
# ~/.coderio/config.toml
[model]
provider_id = "bigmodel_coding_plan" # Zhipu/StepFun coding plan, or openai/anthropic/ollama/custom
default = "glm-5.2"
[tools]
permission_mode = "confirm" # plan | confirm | auto_edit | full
sandbox_mode = "off" # off | job (resource limits) | write (Linux file-write isolation)
# Lifecycle hooks (Claude Code-compatible contract)
[[hooks]]
event = "PreToolUse"
matcher = "write_file|edit_file"
command = "python .hooks/protect.py" # JSON on stdin; exit 2 = block
MCP, the sandbox 4-tuple, and more: docs/coderio-architecture.md.
Common commands
coderio # interactive TUI
coderio run "fix the failing test" --quiet # headless one-shot
coderio run "task" --dangerously-skip-permissions # full access (explicit opt-in)
coderio mcp add github --type http --url ... # manage MCP
coderio skills install # install skill suites
Type / inside the TUI for all commands (/resume sessions, /mode permissions, /undo file writes, /think unfold reasoning).
Known limitations
- The Windows write-sandbox currently equals job mode (true isolation awaits the ACL work — documented honestly)
- Blacklist/whitelist are accident-prevention by design (regex can be bypassed by obfuscation); use the sandbox / a VM for adversarial scenarios
Origin
A spare-time project, open-sourced as a working reference for developers building their own coding agents. The name is code + rio (the author's English name is Lion; "codelion" sounded odd).
Contributing & License
Issues and PRs welcome — see CONTRIBUTING.md. MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coderio-0.4.4.tar.gz.
File metadata
- Download URL: coderio-0.4.4.tar.gz
- Upload date:
- Size: 634.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51ed3e2c4d7ee21705eba76cd82204c6c88098d2efca502af00a5039676448b2
|
|
| MD5 |
c15f89a6d8be39c3d400c04c673deaf6
|
|
| BLAKE2b-256 |
1b6ac7c4746056671bf9acf233fcbb37c8273f92fe6104f706874aeafcfe9f2a
|
Provenance
The following attestation bundles were made for coderio-0.4.4.tar.gz:
Publisher:
release.yml on Lion-1209/coderio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coderio-0.4.4.tar.gz -
Subject digest:
51ed3e2c4d7ee21705eba76cd82204c6c88098d2efca502af00a5039676448b2 - Sigstore transparency entry: 2582613905
- Sigstore integration time:
-
Permalink:
Lion-1209/coderio@43c2f57871854375b3fd97bcc2a03ddca0fa38ad -
Branch / Tag:
refs/tags/v0.4.4 - Owner: https://github.com/Lion-1209
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@43c2f57871854375b3fd97bcc2a03ddca0fa38ad -
Trigger Event:
push
-
Statement type:
File details
Details for the file coderio-0.4.4-py3-none-any.whl.
File metadata
- Download URL: coderio-0.4.4-py3-none-any.whl
- Upload date:
- Size: 300.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cccd6d6f6f3002bb4f97d831ac3fb82de1c2d4d3030409b1fdfdd47cd49a1ad
|
|
| MD5 |
4e36cb13976f46d907184e1374e2ad8e
|
|
| BLAKE2b-256 |
9d3382410f5494395cdd3a08fc0e24e3ec02e64a6dd6a2eaab53106b19f9686b
|
Provenance
The following attestation bundles were made for coderio-0.4.4-py3-none-any.whl:
Publisher:
release.yml on Lion-1209/coderio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coderio-0.4.4-py3-none-any.whl -
Subject digest:
6cccd6d6f6f3002bb4f97d831ac3fb82de1c2d4d3030409b1fdfdd47cd49a1ad - Sigstore transparency entry: 2582613910
- Sigstore integration time:
-
Permalink:
Lion-1209/coderio@43c2f57871854375b3fd97bcc2a03ddca0fa38ad -
Branch / Tag:
refs/tags/v0.4.4 - Owner: https://github.com/Lion-1209
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@43c2f57871854375b3fd97bcc2a03ddca0fa38ad -
Trigger Event:
push
-
Statement type: