Typer-based CLI for tmux-backed Codex orchestration sessions
Project description
tmux-orche
Persistent tmux-backed agent sessions for delegation, review, and takeover.
tmux-orche is for the gap between "run an agent once" and "manually babysit tmux panes all day".
It lets you:
- open a named agent session once and keep reusing it
- hand work off and return immediately
- inspect progress later without losing terminal state
- route replies explicitly to another session or to Discord
- take over the live TTY at any point
If you already use Codex or Claude Code in tmux, orche gives that workflow stable names, explicit session state, and a clean handoff loop.
Why Use It
Most agent workflows break down in the same places:
- the session disappears after one command
- you lose the exact terminal state that produced the result
- follow-up prompts start from scratch
- multi-agent review flows turn into ad-hoc tmux scripting
- notifications become implicit and hard to reason about
orche fixes that by making the session the primary unit of work.
You do not talk to "some pane". You talk to a named session with:
- a working directory
- an agent type
- a persistent tmux pane
- optional explicit notify routing
- later inspection and takeover
What Makes It Different
Session-first, not pane-first
You work with repo-worker, repo-reviewer, or auth-fixer, not %17.
Handoff-first, not babysitting-first
The default flow is:
openprompt- leave
status/readlater
Explicit notify, no default route
Notifications only fire when you explicitly bind a route.
tmux:<session>discord:<channel-id>
There is no implicit global default delivery path.
Works for both background delegation and live takeover
Use read and status for normal follow-up.
Use attach when you want to directly take control of the terminal.
Core Workflow
# open a worker session once
orche open \
--cwd /path/to/repo \
--agent codex \
--name repo-worker \
--notify tmux:repo-reviewer
# send work
orche prompt repo-worker "analyze the failing tests and propose a fix"
# come back later
orche status repo-worker
orche read repo-worker --lines 120
# take over if needed
orche attach repo-worker
# close when finished
orche close repo-worker
That is the intended model: persistent session, explicit handoff, later inspection.
Best Fit Scenarios
tmux-orche is a good fit when you want:
- one reviewer session coordinating multiple workers
- a long-running implementation or research worker
- stable session names across multiple prompts
- terminal-native agents that sometimes ask for input
- explicit tmux-based notify between sessions
- a way to jump into the exact live terminal when automation is not enough
It is less useful when you only need one short-lived command and do not plan to come back to the session.
Quick Start
Open a managed session with explicit notify:
orche open \
--cwd /path/to/repo \
--agent codex \
--name repo-worker \
--notify tmux:repo-reviewer
Send work:
orche prompt repo-worker "implement the parser refactor"
Inspect later:
orche status repo-worker
orche read repo-worker --lines 120
orche list
Answer interactive prompts:
orche input repo-worker "yes"
orche key repo-worker Enter
Take over the TTY:
orche attach repo-worker
Managed vs Native Sessions
Managed session
Use managed mode for normal delegation:
orche open --cwd /repo --agent codex --name repo-worker --notify tmux:repo-reviewer
This is the default recommendation.
Native session
Use native mode when you need raw agent CLI args:
orche open --cwd /repo --agent claude -- --print --help
Rules:
- raw agent args must come after
-- - native sessions do not use
--notify - do not mix raw agent args with managed notify routing
Command Model
orche openCreate or reuse a named session.orche promptSend a prompt into an existing session.orche statusCheck whether the pane and agent are alive, and whether a turn is pending.orche readRead recent terminal output.orche attachAttach your terminal to the live tmux session.orche inputType text without pressing Enter.orche keySend special keys such asEnter,Escape, orC-c.orche listList locally known sessions.orche cancelInterrupt the current turn but keep the session alive.orche closeEnd the session and clean up state.orche whoamiPrint the current session id.orche configRead or update shared runtime config.
Multi-Agent Review Pattern
# reviewer
orche open --cwd /repo --agent codex --name repo-reviewer --notify discord:123456789012345678
# worker reports back to reviewer
orche open --cwd /repo --agent codex --name repo-worker --notify tmux:repo-reviewer
# send implementation work
orche prompt repo-worker "implement the parser refactor"
# later inspect reviewer
orche read repo-reviewer --lines 120
This gives you a durable reviewer/worker loop without ad-hoc tmux scripting.
Notify
Notify is explicit.
orche open --notify accepts:
tmux:<target-session>discord:<channel-id>
Examples:
orche open --cwd /repo --agent codex --name repo-reviewer --notify discord:123456789012345678
orche open --cwd /repo --agent codex --name repo-worker --notify tmux:repo-reviewer
Notes:
- use
tmux:<session>for agent-to-agent routing - use
discord:<channel-id>only when you want Discord delivery - changing notify target means opening a new session
Installation
Full 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 .
Config
orche config list
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/
Prerequisites
tmuxcodexCLI and/orclaudeCLI- 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.4.7.tar.gz.
File metadata
- Download URL: tmux_orche-0.4.7.tar.gz
- Upload date:
- Size: 59.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 |
17c9eccf9efd5a3c936a4296bed48ff20e95db8965c55a89525316e67f1a661c
|
|
| MD5 |
bc7a061ccd8abf668d8895250ee19641
|
|
| BLAKE2b-256 |
801f3e316064bb0d8c4858fd282d3e01f85485497f78c119c0760f1c9bd3d2e5
|
Provenance
The following attestation bundles were made for tmux_orche-0.4.7.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.4.7.tar.gz -
Subject digest:
17c9eccf9efd5a3c936a4296bed48ff20e95db8965c55a89525316e67f1a661c - Sigstore transparency entry: 1228768815
- Sigstore integration time:
-
Permalink:
parkgogogo/tmux-orche@1666216a20caeeeae49e3a35e50f257cd31d6920 -
Branch / Tag:
refs/tags/v0.4.7 - Owner: https://github.com/parkgogogo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1666216a20caeeeae49e3a35e50f257cd31d6920 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tmux_orche-0.4.7-py3-none-any.whl.
File metadata
- Download URL: tmux_orche-0.4.7-py3-none-any.whl
- Upload date:
- Size: 44.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 |
5cbf029bc7c7eb1136e9a398058a49e37639bb5d4d978d3192648b108018808f
|
|
| MD5 |
be35e5930368ee06cdfc7e4eac6cbcf9
|
|
| BLAKE2b-256 |
ff9c27b10e8ca7b1e97be69eaf68317bac960692b99a97d57e8966470e8ea385
|
Provenance
The following attestation bundles were made for tmux_orche-0.4.7-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.4.7-py3-none-any.whl -
Subject digest:
5cbf029bc7c7eb1136e9a398058a49e37639bb5d4d978d3192648b108018808f - Sigstore transparency entry: 1228768829
- Sigstore integration time:
-
Permalink:
parkgogogo/tmux-orche@1666216a20caeeeae49e3a35e50f257cd31d6920 -
Branch / Tag:
refs/tags/v0.4.7 - Owner: https://github.com/parkgogogo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1666216a20caeeeae49e3a35e50f257cd31d6920 -
Trigger Event:
push
-
Statement type: