File-backed task orchestrator for Codex CLI workflows.
Project description
codex-orch
codex-orch is a local-first task orchestrator for Codex CLI.
It keeps tasks, presets, dependency edges, run snapshots, assistant protocol
artifacts, and published outputs on disk instead of in a database. A run
materializes a subgraph from a task pool, freezes it into a snapshot, then
executes nodes with codex exec while Prefect provides orchestration,
concurrency, and run metadata.
Features
- File-backed task pool with CRUD operations
- Two dependency kinds:
orderandcontext compose.from_depreads only from explicitly consumedcontextartifacts- Global presets under
~/.codex-orch/plus per-program presets - Prefect-backed run snapshots and resumable execution
- Published-artifact handoff between tasks
- Assistant control-plane protocol:
assistant_request.json,assistant_response.json,assistant_control_action.json - Manual-gate protocol:
manual_gate.json,human_request.json,human_response.json - Built-in worker assistant escalation contract plus bundled
operate-codex-orchoperator skill - Local web board for task lists, kanban, dependency graph, presets, runs, assistant inbox, and manual gates
Repository layout
codex-orch/
├── src/codex_orch/
├── tests/
├── docs/
└── examples/
Program layout
Each orchestrated program lives in its own directory, for example:
codex-programs/my-program/
├── project.yaml
├── tasks/
├── presets/
├── prompts/
├── inputs/
└── .runs/
Quick start
For local development in this repository:
uv sync --extra dev
uv run codex-orch task list /path/to/program
uv run codex-orch web /path/to/program
For operators working from a codex-orch program directory after the package is published to PyPI:
pipx install codex-orch
codex-orch --version
codex-orch task list .
Assistant helper flow
Worker-side assistant escalation is built into each node's runtime prompt plus a node-local helper doc at:
.runs/<run-id>/nodes/<task-id>/context/assistant/requesting-help.md
Workers should use the stable CLI helper instead of hand-writing protocol files:
codex-orch assistant request create \
--program-dir /path/to/program \
--run-id 20260319010101-deadbeef \
--task-id executeRefactor \
--kind clarification \
--decision-kind policy \
--question "Can I delete the legacy wrapper?" \
--option delete \
--option keep_wrapper
When a worker runs inside codex-orch, the helper can infer:
CODEX_ORCH_PROGRAM_DIRCODEX_ORCH_RUN_IDCODEX_ORCH_TASK_IDCODEX_ORCH_NODE_DIRCODEX_ORCH_PROJECT_WORKSPACE_DIRCODEX_ORCH_WORKSPACE_DIR
Assistant artifacts passed with --artifact must be relative to
CODEX_ORCH_PROGRAM_DIR.
An auto_reply is reinjected only into the same task continuation on resume. A
handoff_to_human reply materializes manual_gate.json and
human_request.json for that node and pauses execution until a human responds
and the gate is approved or rejected.
Assistant or human responses are written back with:
codex-orch assistant respond /path/to/program <request-id> \
--resolution-kind auto_reply \
--answer "Delete it." \
--rationale "The repository does not need compatibility wrappers."
Control-plane actions are stored separately from replies:
codex-orch assistant action create /path/to/program <request-id> \
--action-kind append_guidance_proposal \
--requested-by assistant \
--target-kind user_guidance \
--target-path "~/.codex/AGENTS.md" \
--reason "Promote a repeated decision to long-term guidance."
Skill export
codex-orch ships a canonical operate-codex-orch skill template for
external or user-controlled agents operating a program from outside a worker
node. It is not the worker-side escalation mechanism. The skill assumes the
operator is in the target program directory and that codex-orch was installed
separately, typically with pipx install codex-orch.
Maintainers can still export it from this repository or install it into a
repo-local .codex/skills/ folder explicitly:
uv run codex-orch skill list
uv run codex-orch skill export operate-codex-orch /tmp/exported-skills
uv run codex-orch skill install operate-codex-orch --repo-dir /path/to/repo
The exported skill contains:
SKILL.mdreferences/quickstart.mdreferences/operator-runbook.md
Manual gates
When an assistant response chooses handoff_to_human, codex-orch now
materializes:
manual_gate.jsonhuman_request.jsonhuman_response.jsonafter a human replies
The CLI exposes the minimal human-control surface:
codex-orch manual-gate list /path/to/program
codex-orch manual-gate show /path/to/program <gate-id>
codex-orch manual-gate respond /path/to/program <gate-id> \
--answer "Delete the wrapper."
codex-orch manual-gate approve /path/to/program <gate-id> --resume
The web UI exposes the same flow at /manual-gates.
Waiting semantics
Run snapshots still use waiting at the top level, but node-level waiting now
records a specific reason:
assistant_pendinghandoff_to_humanmanual_gate_blocked
This makes resume deterministic: unresolved gates stay blocked, approved gates
resume, and rejected gates fail the run instead of remaining ambiguous.
Status
This repository is intentionally local-first and single-user. The web UI is a thin convenience layer over the same file-backed domain logic used by the CLI.
Project details
Release history Release notifications | RSS feed
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 codex_orch-0.1.0.tar.gz.
File metadata
- Download URL: codex_orch-0.1.0.tar.gz
- Upload date:
- Size: 200.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3291e5332b0e82a0887690e15f18d2fce7c8d2520c334016730b4d726a2a1a4
|
|
| MD5 |
d906782dca80dc715b12aa7ba596597d
|
|
| BLAKE2b-256 |
f8eb4d059740115969555996ee7a88e0b3d329f79cac5949a77d86c770e714fd
|
Provenance
The following attestation bundles were made for codex_orch-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on BingyangWu-sms21/codex-orch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codex_orch-0.1.0.tar.gz -
Subject digest:
d3291e5332b0e82a0887690e15f18d2fce7c8d2520c334016730b4d726a2a1a4 - Sigstore transparency entry: 1193957780
- Sigstore integration time:
-
Permalink:
BingyangWu-sms21/codex-orch@264846fae44dfdfc71c12514480f56dbc10eb090 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/BingyangWu-sms21
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@264846fae44dfdfc71c12514480f56dbc10eb090 -
Trigger Event:
push
-
Statement type:
File details
Details for the file codex_orch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codex_orch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 67.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6585500c72d95abced06a21b32847feed48b39e438278b6483384723163e502a
|
|
| MD5 |
b8dc63e83e2158715f274e4810d0d330
|
|
| BLAKE2b-256 |
0a96ee719293ac24ff90e9bdec36d3a4959b7d4fce1b572b3282d8124b3237f6
|
Provenance
The following attestation bundles were made for codex_orch-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on BingyangWu-sms21/codex-orch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codex_orch-0.1.0-py3-none-any.whl -
Subject digest:
6585500c72d95abced06a21b32847feed48b39e438278b6483384723163e502a - Sigstore transparency entry: 1193957786
- Sigstore integration time:
-
Permalink:
BingyangWu-sms21/codex-orch@264846fae44dfdfc71c12514480f56dbc10eb090 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/BingyangWu-sms21
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@264846fae44dfdfc71c12514480f56dbc10eb090 -
Trigger Event:
push
-
Statement type: