| Crates.io | tenex |
| lib.rs | tenex |
| version | 1.0.7 |
| created_at | 2025-12-09 06:06:39.190137+00 |
| updated_at | 2026-01-19 04:15:40.710712+00 |
| description | Terminal multiplexer for AI coding agents |
| homepage | https://github.com/Mockapapella/tenex |
| repository | https://github.com/Mockapapella/tenex |
| max_upload_size | |
| id | 1974917 |
| size | 1,701,397 |
Terminal multiplexer for AI coding agents
Tenex lets you run multiple AI coding agents in parallel, each in an isolated git worktree with its own branch. Spawn agent swarms for research, planning, or code review—then synthesize their findings back together.
/agents and /helpCtrl+o)claude (default) or codex (or configure a custom command)# Install from crates.io
curl https://sh.rustup.rs -sSf | sh
cargo install tenex --locked
# Or build from source
git clone https://github.com/Mockapapella/tenex
cd tenex
cargo install --path .
# Navigate to any git repository
cd your-project
# Launch Tenex
tenex
# Press 'a' to create your first agent
# Press '?' for help
| Key | Action |
|---|---|
a |
Add agent (no prompt) |
A |
Add agent with prompt |
d |
Delete agent and all descendants |
S |
Spawn swarm (new root + N children) |
P |
Planning swarm (spawn N planners for selected agent) |
R |
Review swarm (spawn N reviewers for selected agent, then pick base branch) |
+ |
Spawn N sub-agents for selected agent |
s |
Synthesize descendant outputs into parent |
B |
Broadcast message to leaf agents only (excludes terminals) |
| Key | Action |
|---|---|
t |
Spawn terminal (shell as child of selected root) |
T |
Spawn terminal with startup command |
| Key | Action |
|---|---|
Ctrl+p |
Push branch to remote |
r |
Rename (root: branch + session + worktree; child: title + window only) |
Ctrl+o |
Open pull request (via gh pr create --web) |
Ctrl+r |
Rebase onto selected branch |
Ctrl+m |
Merge selected branch into current |
Ctrl+n |
Merge (fallback for terminals that can't distinguish Ctrl+m from Enter) |
| Key | Action |
|---|---|
↓ |
Next agent |
↑ |
Previous agent |
Enter |
Attach terminal (forward keystrokes to agent) |
Ctrl+q |
Detach terminal / Quit (with confirm if agents running) |
Esc |
Cancel current modal or flow |
Tab |
Cycle tabs forward (Preview/Diff/Commits) |
Space |
Collapse/expand agent tree |
Ctrl+u |
Scroll preview/diff/commits up |
Ctrl+d |
Scroll preview/diff/commits down |
g |
Scroll to top |
G |
Scroll to bottom |
? |
Help |
/ |
Command palette (/agents, /help) |
The default agent command is claude --allow-dangerously-skip-permissions. Press / to open the command palette, run /agents, then choose which agent type to configure (default/planner/review).
| File | Location | Description |
|---|---|---|
| State | ~/.tenex/state.json |
Agent list and hierarchy |
| Settings | ~/.tenex/settings.json |
Tenex settings |
| Worktrees | ~/.tenex/worktrees/ |
Git worktrees for agents |
| Logs | OS temp dir (e.g. /tmp/tenex.log) |
Debug logs (when enabled) |
On startup, Tenex migrates legacy data from ~/.local/share/tenex/ to ~/.tenex/.
| Variable | Description |
|---|---|
DEBUG |
Log level: 0 off, 1 warn, 2 info, 3 debug |
TENEX_MUX_SOCKET |
Override mux daemon socket name/path |
TENEX_STATE_PATH |
Override state file location (also derives settings.json and worktrees/ next to it) |
If TENEX_STATE_PATH is relative, it resolves from the current working directory.
tenex # Launch the TUI
tenex reset # Clear all agents and state
tenex reset --force # Force reset without confirmation
tenex --help # Show help
tenex --version # Show version
Press S to create a new root agent with N child agents. You'll be prompted for:
Press P for a planning-focused swarm. Children receive a planning preamble prompt and are titled "Planner N". Use s to synthesize their findings when done.
Press R to spawn code reviewers:
Reviewers get a strict review preamble with the chosen base branch. They're titled "Reviewer N".
Press s to synthesize. This:
.tenex/<uuid>.md in the parent's worktreePress B to send a message to all leaf agents (agents with no children). Terminals are excluded. Useful for giving the same instructions to all workers in a swarm.
When rebase or merge encounters conflicts, Tenex opens a terminal window titled "Merge Conflict" or "Rebase Conflict" in the worktree, runs git status, and leaves resolution to you.
On first launch, Tenex checks if your terminal supports the Kitty keyboard protocol (to distinguish Ctrl+m from Enter). If not supported, you'll be prompted to remap the merge key to Ctrl+n. This choice is saved to settings.json.
If a newly-created agent flashes into existence and vanishes a few seconds later, it usually means the underlying agent process exited during startup (Tenex then prunes the agent because its mux session is gone).
DEBUG=3 tenex and inspect the log at /tmp/tenex.log.~/.tenex/state.json so sessions can survive rebuilds/upgrades.tenex muxd running (old behavior persists until the daemon is restarted). Tenex will prompt you to restart it on launch.TENEX_MUX_SOCKET=/tmp/tenex-mux.sock tenex.