Typer-based CLI for tmux-backed Codex orchestration sessions
Project description
tmux-orche
tmux-backed Codex orchestration for OpenClaw fire-and-forget workflows.
tmux-orche lets OpenClaw hand work to Codex, return immediately, and continue later through the same persistent tmux session. That keeps OpenClaw from burning tokens while Codex works in the background.
OpenClaw Workflow
- OpenClaw creates or reuses a Codex session with
orche session-new. - OpenClaw sends the task with
orche send. orchereturns immediately.- Codex keeps running in tmux.
- When notify arrives, OpenClaw or another agent inspects the same session with
status,read, orhistory. - The session stays available until it is explicitly closed.
Quick Start
Create or reuse a session:
orche session-new \
--cwd /path/to/repo \
--agent codex \
--name repo-codex-main \
--discord-channel-id 123456789012345678
Send work and return immediately:
orche send --session repo-codex-main "analyze the failing tests and propose a fix"
Inspect the same session later:
orche status --session repo-codex-main
orche read --session repo-codex-main --lines 120
orche history --session repo-codex-main --limit 20
Close it when done:
orche close --session repo-codex-main
Installation
Full step-by-step install guide: https://github.com/parkgogogo/tmux-orche/raw/main/install.md
Install from PyPI:
pip install tmux-orche
Install with uv:
uv tool install tmux-orche
Install from source:
git clone https://github.com/parkgogogo/orche
cd orche
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install .
Commands
orche session-new --cwd /repo --agent codex --name repo-codex-main --discord-channel-id 123456789012345678Create or reuse a persistent Codex tmux session.orche send --session repo-codex-main "review the recent auth changes"Send a task into an existing session and return immediately.orche status --session repo-codex-mainCheck whether the session and Codex process are still running.orche read --session repo-codex-main --lines 80Read recent terminal output from the live session.orche type --session repo-codex-main --text "yes"Type text into the live Codex session without pressing Enter.orche keys --session repo-codex-main --key EnterSend one or more key presses to the live Codex session.orche history --session repo-codex-main --limit 20Show recent local control actions for that session.orche close --session repo-codex-mainClose the session when the work is finished.orche config listShow current runtime configuration.
Interactive Input
Use type and keys when Codex is waiting on an interactive prompt inside the tmux session.
Read the latest output first:
orche read --session repo-codex-main --lines 40
Type text without submitting it:
orche type --session repo-codex-main --text "yes"
Then send Enter:
orche keys --session repo-codex-main --key Enter
This is useful for prompts such as trust confirmations, shell confirmations, or any other step where Codex is paused waiting for input.
You can also send multiple keys in one command:
orche keys --session repo-codex-main --key Down --key Down --key Enter
Config
Manage runtime settings:
orche config list
orche config get discord.channel-id
orche config set discord.channel-id 123456789012345678
orche config set discord.bot-token "$BOT_TOKEN"
orche config set discord.mention-user-id 123456789012345678
orche config set notify.enabled true
Config file:
~/.config/orche/config.json
State directory:
~/.local/share/orche/
Troubleshooting
Cancel a stuck turn
If Codex is stuck, running in the wrong direction, or needs to be stopped without losing the session:
orche cancel --session repo-codex-main
This interrupts the current Codex turn but keeps the session alive, allowing you to read output and send a corrected task.
Compare with close:
cancel: Interrupt current turn, keep session (for stuck or still-running tasks)close: End entire session (for completed or abandoned tasks)
Prerequisites
tmuxtmux-bridgecodexCLI- Python
3.9+
License
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 tmux_orche-0.3.4.tar.gz.
File metadata
- Download URL: tmux_orche-0.3.4.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55aa7129f779b831607417024ef67fbf9fa58d229a11add7d8dd549ddd95a54a
|
|
| MD5 |
5312525225647c9c6b1fbbdcebe6c251
|
|
| BLAKE2b-256 |
8b2531e4358f5ce6be6ff78900a6d0dbb4e79f4785ecd3f6aec33b80d3cf7904
|
Provenance
The following attestation bundles were made for tmux_orche-0.3.4.tar.gz:
Publisher:
publish.yml on parkgogogo/tmux-orche
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tmux_orche-0.3.4.tar.gz -
Subject digest:
55aa7129f779b831607417024ef67fbf9fa58d229a11add7d8dd549ddd95a54a - Sigstore transparency entry: 1214542219
- Sigstore integration time:
-
Permalink:
parkgogogo/tmux-orche@82ef882835151ffb55726a4fae220cae617c6902 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/parkgogogo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@82ef882835151ffb55726a4fae220cae617c6902 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tmux_orche-0.3.4-py3-none-any.whl.
File metadata
- Download URL: tmux_orche-0.3.4-py3-none-any.whl
- Upload date:
- Size: 25.5 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 |
db300a8732c815e27dde50081abc07e7a91365e1580461960c1896e9815aa347
|
|
| MD5 |
fd87332485ca39bfdc3dda0e3ac3630a
|
|
| BLAKE2b-256 |
2500a730b68e52f2cfd8f85159be03c30ecf82a429b004e7894cda479fe23704
|
Provenance
The following attestation bundles were made for tmux_orche-0.3.4-py3-none-any.whl:
Publisher:
publish.yml on parkgogogo/tmux-orche
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tmux_orche-0.3.4-py3-none-any.whl -
Subject digest:
db300a8732c815e27dde50081abc07e7a91365e1580461960c1896e9815aa347 - Sigstore transparency entry: 1214542463
- Sigstore integration time:
-
Permalink:
parkgogogo/tmux-orche@82ef882835151ffb55726a4fae220cae617c6902 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/parkgogogo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@82ef882835151ffb55726a4fae220cae617c6902 -
Trigger Event:
push
-
Statement type: