Skip to main content

Typer-based CLI for tmux-backed Codex orchestration sessions

Project description

中文 · Install Guide

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

  1. OpenClaw creates or reuses a Codex session with orche session-new.
  2. OpenClaw sends the task with orche send.
  3. orche returns immediately.
  4. Codex keeps running in tmux.
  5. When notify arrives, OpenClaw or another agent inspects the same session with status, read, or history.
  6. 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 123456789012345678 Create 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-main Check whether the session and Codex process are still running.
  • orche read --session repo-codex-main --lines 80 Read recent terminal output from the live session.
  • orche history --session repo-codex-main --limit 20 Show recent local control actions for that session.
  • orche close --session repo-codex-main Close the session when the work is finished.
  • orche config list Show current runtime configuration.

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

  • tmux
  • tmux-bridge
  • codex CLI
  • Python 3.9+

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmux_orche-0.4.1.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tmux_orche-0.4.1-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file tmux_orche-0.4.1.tar.gz.

File metadata

  • Download URL: tmux_orche-0.4.1.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tmux_orche-0.4.1.tar.gz
Algorithm Hash digest
SHA256 0d2abdc377b6b19b74147e43a9b116d6dc8a3c0bac9839805ed2366ab8ca96dc
MD5 642e7e344fbe0f89c9d4c2e8abc26702
BLAKE2b-256 934857657680aae9e346a5c2c23d8799e48a9f5b70b3ffb1413cf1a7ab31ddc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tmux_orche-0.4.1.tar.gz:

Publisher: publish.yml on parkgogogo/tmux-orche

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tmux_orche-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: tmux_orche-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tmux_orche-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45cf9ec6ebfabca0d492534ce14729c8d482ff378e19ac77ba54612a3b14e3d2
MD5 9a9a5e94b7ee1a1a08683d7e6b243ef7
BLAKE2b-256 9f118d6944d9737f219079ac2ad36520182a2fb8dfbf6dc58238a31edb9c57e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tmux_orche-0.4.1-py3-none-any.whl:

Publisher: publish.yml on parkgogogo/tmux-orche

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page