rex-pack
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Fail
- process.env — Environment variable access in src/cli.ts
- process.env — Environment variable access in src/config.ts
- exec() — Shell command execution in src/driver.ts
- exec() — Shell command execution in src/frontmatter.ts
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
A CLI and agent skill for orchestrating subagents in Rex. Your coding agent delegates tasks to Claude Code, Codex, Grok, Muse, Pi, and other agents, each in its own Rex pane on your existing sign-in, and reads back their reports.
rex-pack 🦖
Orchestrate subagents, in Rex. From the coding agent you're already talking to in
Rex, delegate to other agents in their own harnesses including Claude Code, Codex, Google Neon, Grok, OpenCode, Muse, and more. Each worker gets its own Rex pane and runs in parallel on its own existing sign-in. Their results are folded into the main conversation automatically. All with the Rex setup, agent harnesses, and subscriptions you already use.
[!NOTE]
rex-pack is an independent project. It is not made by, affiliated with, or endorsed by
Superlogical, the makers of Rex.
🚀 Set it up: paste this to your agent
Open your coding agent (Claude Code, Codex, or similar) inside a Rex terminal and paste:
Set up rex-pack (https://github.com/boundsj/rex-pack) for me.
1. Check prerequisites and tell me what's missing before installing anything:
- macOS, and you are running inside a Rex pane: `rex whoami --json` works and REX_BLOCK is set
- Node 26 or newer (`node --version`) and `jq`
- At least one worker CLI installed and signed in:
`claude auth status`, `codex login status`, `agy models`, `grok`, `opencode auth list`, or `muse usage`
2. Clone the repo to ~/Developer/rex-pack (or wherever I keep code), then run
`npm install && npm run build && npm test && npm link`. `npm link` installs into the Node version
that is active at the time, so run it again after switching Node versions.
3. Install the skill for all my agents by symlinking the repo's skills/rex-pack folder into
~/.claude/skills/rex-pack and ~/.agents/skills/rex-pack. Don't overwrite anything already there.
4. Run `rex-pack workers --check` and report which workers are installed and signed in.
5. Ask me before running a live test job, since it uses that worker's quota.
That's it. Start a fresh agent session (skills load at startup) and try orchestration.
🦕 Then just ask
"Use a Claude worker to write the parser and a Neon worker to write its tests, in parallel.
Bring back both reports and review the diffs."
Your agent reads the rex-pack skill, writes each worker a brief, launches them in panes beside
you, waits, and reads their reports. Then it carries on with your task. Finished panes close on
their own.
Workers work right in your current branch, side by side, each on the files its task covers. Want
them kept apart? Add "each in its own worktree" to your request.
🧰 The pack
| Worker | Agent | How rex-pack talks to it |
|---|---|---|
claude |
Claude Code | Claude Agent SDK |
codex |
Codex | Codex app-server |
muse |
Muse | MSP, muse's own protocol |
grok |
Grok Build | ACP |
opencode |
OpenCode | ACP (opencode acp) |
agy (or neon) |
Antigravity: Google Neon and other Gemini models | its app, in a pane |
pi |
Pi, with any model it's set up for, local ones included | its app, in a pane |
OpenCode runs structured-only through opencode acp. Pick one of its provider/model IDs
with -m; effort follows the model. Its own permission rules apply and --approvals ask is
refused, so use it only for work you'd run yourself. OpenCode project config discovery (opencode.json(c),.opencode/, and mid-session reloads — plus relative or in-workspace OPENCODE_CONFIG /OPENCODE_CONFIG_DIR overrides) is disabled with OPENCODE_CONFIG_PROJECT_DISABLE=1 unless--trust-hooks is passed (external/global config and globally enabled built-in formatters that
can invoke repo tools still apply). workers --check reports its sign-in as unverified rather than
claiming a credential it has not proven. rex-pack usage reports unknown (or local forusage: local variants), and interrupted jobs are held for inspection rather than resumed.
A live run on OpenCode 2.4.3 with -m opencode/deepseek-v4.1-flash-free -e low returned done
with its fresh report.
Models are yours. Each worker runs on whatever model its CLI is already set up to use. Want
something else? Just say so: "use Opus for this one" for a single job, or "make Neon high my
default agy worker" to save it. You can set reasoning effort the same way ("run Sol at high").
Want it faster instead? Ask for a faster service tier with --speed or config set WORKER.speed ...
(Codex priority, Claude fast). It's separate from reasoning effort.
Every report starts with the model the worker actually ran on. In structured mode rex-pack verifies
the speed before sending the prompt, and the report and status show the provider-reported speed
(for Codex, the thread's applied serviceTier). In pane mode it maps the CLI flag and recordsrequested_speed, with no provider-side verification.
Settings live in ~/.config/rex-pack/config.json. Besides default models and effort, you can name
your own workers there, like opus for Claude on Opus or work for a second Codex account.
📓 Playbooks: save how you like to run the pack
Tired of typing the same "Claude plans and builds, Codex reviews" setup? Save it as a playbook,
a Markdown file in ~/.config/rex-pack/playbooks/. Just ask: "save this as my default rex-pack
playbook." A playbook named default applies whenever your agent delegates. To use another, name
it ("rex pack orchestrate: add the parser"). Anything you say in the request still wins.
---
description: Claude plans and builds, Codex reviews
roles:
plan: { worker: claude, effort: xhigh }
implement: { worker: claude, effort: high }
review: { worker: codex, effort: xhigh }
---
- Plan the change.
- Implement bounded tasks from the plan.
- Review the plan, then the implementation.
- Stop when there's a mergeable PR and tell me.
Each role names a worker (built-in or one you saved) and can set its model, effort, or speed.
Add repo: ~/Developer/my-app to tie a playbook to one project: it applies there and in that
repo's worktrees, and beats a global one of the same name.
rex-pack playbooks # what's saved, which one wins here, and any errors
rex-pack playbook remove orchestrate # delete one (--global for the global one)
🔍 How it works
rex-pack is a small CLI your agent calls. It doesn't run models or hold credentials. Rex does the
heavy lifting, and rex-pack uses its tools to run the pack:
rex splitopens each worker's pane beside yours.- Rex's program status lets every agent report what it's doing: working, done, blocked, or
waiting on you. That's how rex-pack knows a job is finished without guessing from the screen. rex eventsstreams those status changes, sowaitdoesn't have to poll.rex sendtypes into a pane, andrex capturesaves a worker's screen when something
goes wrong.
Each job gets a folder with a brief.md the worker reads and a result.md it writes back.
rex-pack speaks each agent's own language. When an agent has a programmable mode, rex-pack
runs it through a small host in the worker's pane and talks to it directly. Approvals, models,
errors, and "turn finished" all arrive as data. The pane still shows a live transcript, so you can
watch.
- Claude, Codex, and Muse have their own protocols, and rex-pack uses them: the Claude Agent
SDK, Codex app-server, and MSP. - Grok and OpenCode use ACP, the Agent Client Protocol: an
open standard for tools to drive coding agents. One ACP client in rex-pack works for any agent
that speaks it, but ACP covers only what agents have in common. That's why Muse, which offers
both, uses its own MSP: through ACP, Muse's reasoning effort can't be set. OpenCode is driven
only through ACP (opencode acp); rex-pack has no OpenCode pane mode. - agy and Pi don't have a mode rex-pack uses yet, so rex-pack types into their app in a pane
and follows their Rex status.
More detail: how it works and
which protocol each agent uses, and why.
🛡️ Approvals and guard rails
- Auto by default, never bypass. Workers run in their agent's own automatic mode: Claude's
auto mode, Codex's automatic reviewer inside its sandbox, Muse's reviewer, agy's auto mode. You
aren't asked to approve routine steps. Anything the agent's reviewer escalates comes to you in
the worker's pane: typeyorn. rex-pack never grants "always allow". - Want to approve everything yourself?
rex-pack config set WORKER.approvals ask, or--approvals askfor one job. - Some agents can't take ask-first. Grok and Pi act with your full user permissions, and
OpenCode follows its own broad permission rules. Give them only work you'd run yourself;
rex-pack refusesapprovals: askfor all three rather than pretend. - Workers share your checkout, politely. Each brief tells the worker other agents may be in
the same folder, to change only its task's files, and to leave git alone. Your agent reviews and
integrates. Ask for worktrees when tasks overlap. - Trust is opt-in.
--trustanswers a worker's folder-trust prompt only when it names that
exact folder. - Your sign-ins, your quotas. Claude workers run on your Claude plan, and rex-pack refuses to
start one that would use an API key instead. - Reports aren't proof. Agents should check the diff and run the tests before integrating.
🏠 Bring your own agent: local and custom models
Got a local model or a custom setup, like a shell alias that starts Pi on your own model server?
Ask your agent to add it to the pack:
Add my `pi-inkling` alias to rex-pack as a worker named `inkling`.
Look at what the alias does, turn it into an executable wrapper script (ending in "$@") in
~/.local/bin, then save it with `rex-pack config set inkling.use pi` and
`rex-pack config set inkling.command <script path>`, and mark it local with
`rex-pack config set inkling.usage local` (so `rex-pack usage` says "local model: no limits").
Run one small test job and show me the report.
Then just ask for it: "have an inkling worker write the tests."
Why a script? Workers start in a fresh pane without your shell setup, so an alias or shell
function isn't visible there. The script also loads any keys at run time, so no secret goes into
the config file.
The same recipe works for a wrapper around any CLI in the pack, such as a second Claude account
(use claude). An agent can join only if it reports its status to Rex, since that's how rex-pack
knows a job is finished. rex-pack adds that for Pi with a small extension.
⌨️ Driving it by hand
Agents do this for you, but it's all plain commands:
rex-pack workers --check # who's in the pack, and signed in
A=$(rex-pack launch -w claude -t "…" | jq -r .id) # runs in the current directory
B=$(rex-pack launch -w agy -d ../wt-b --trust -t "…" | jq -r .id) # or in another folder
rex-pack wait "$A" "$B" # parallel wait
rex-pack result "$A" # the worker's full report; closes its pane
rex-pack cancel "$A" # close its pane
rex-pack run -w codex -e high -t "…" # launch + wait + result in one go
rex-pack run -w opencode -m provider/model -e high -t "…" # OpenCode: pick the provider-qualified model
rex-pack usage # how much each worker has left
rex-pack config set claude.model claude-opus-5-5 # save a default model
rex-pack prune --dry-run # finished jobs older than 30 days, and the space they use
rex-pack prune --older-than 30d # delete them (open panes and unmerged worktrees stay)
wait exits 0 when everything is done, 10 if a worker needs you, 11 if one failed, and
124 if one is still working (just wait again).
🔌 MCP server
rex-pack also runs as an MCP server, so your agent can call it as typed tools instead of shell
commands. Add it once:
claude mcp add rex-pack -- rex-pack mcp # Claude Code
codex mcp add rex-pack -- rex-pack mcp # Codex
pi mcp add rex-pack -- rex-pack mcp # Pi
If Codex filters the server's environment, forward your pane's identity by addingenv_vars = ["REX_BLOCK", "REX_SESSION"] to the rex-pack server in ~/.codex/config.toml.
Never hardcode a REX_BLOCK value: it has to be the pane the agent is actually running in.
- What you get: the same commands as tools, with the same names and safety rules:
launch,wait,run,status,result,send,resume,recover,approve,deny,answer,cancel,cleanup,ls,workers,config,playbooks,usage, andprune. The skill is
served as the resourceskill://rex-pack/SKILL.md, with a one-line pointer to it.update
stays CLI-only. - Nothing outside Rex. If
REX_BLOCKis unset or Rex doesn't know that pane, the server
starts empty: no tools, no instructions, no context cost. - Long waits stay alive.
wait,run, andresumesend a progress notification every 15
seconds when the client asks for progress, keeping long calls alive past shorter request timeouts
when the client resets its timeout on progress and allows enough total time. - MCP or CLI? Prefer MCP when the agent's harness limits shell commands or sandboxes away the
keychain and local sockets (Codex as the parent, for example), or when you want typed inputs and
results. The CLI and skill keep working the same way alongside it.
⬆️ Keeping the pack up to date
rex-pack update updates the agent CLIs (claude, codex, agy, pi, grok, muse) and Rex
Server on this machine and on every Rex host it can reach. Each one is updated the way it was
installed (its own updater, mise, npm, Homebrew, or the official Rex release archive). It shows
the plan and asks before changing anything.
rex-pack update # every reachable host; shows the plan, then asks
rex-pack update --local # this machine only
rex-pack update --hosts afk,mini # only these hosts
rex-pack update --only claude,codex # only these targets (rex-server is a target too)
rex-pack update --dry-run # the plan and exact commands; changes nothing
rex-pack update --yes # no prompts
rex-pack update --dry-run --json # for agents: the plan as JSON
rex-pack update --yes --json # for agents: the report as JSON
It never uses sudo, never installs a CLI that isn't there, and skips anything a worker or
rex-pack job is using (pass --force to update agent CLIs even if they appear in use). A Rex Server with active sessions is restarted only after you confirm;
with --yes it is skipped unless you also pass --force-rex-restart. Exit codes: 0 ok,
1 something failed or a host was unreachable, 2 bad flags.
Credits
rex-pack's orchestration model borrows from T3 Code, and its
pane handling from rex-orchestrator. The animations
are generated by docs/animations/render.mjs.
License
MIT.
Rex is a product of Superlogical. rex-pack is independent and unaffiliated.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found