Repository navigation
Releases
v0.9.0
rex-teams v0.9.0
Subagents can now open in a pane beside you instead of a new tab. Thanks to @fmal, who built this (#44).
What's new
- Pass
split=right(orleft,aboveorbelow) tospawn.lua, and the subagent opens in a pane on that side of you. Leave it out and you get a tab, as before. You don't need to remember the flag: ask your agent for "a helper in a pane next to me" or "a split below" and it will use it. - If you start several pane subagents, they stack in the other half of your pane in the order you started them, so you always keep half the space for yourself.
- Panes and tabs behave the same way. You can pull a pane out into its own tab, or move a tab into a split, and the subagent keeps its name. It still shows up in
team.lua, takes messages by that name, and reports and closes as before. - You keep your own name once you've opened a pane, so others can still reach you with
block=<the name team.lua shows>. - The kickoff and report text are clearer (#76). A subagent's kickoff tells it only what it should do. Its report lists any files first and ends with a step meant for you, starting "For my parent, if this is completed and checks out".
Upgrading
- Update the skill folder the way you installed it.
- Restart the postman so it picks up the new code (#77). Find its block in the
rex-teamssession withrex block ls -A, and close it withrex block close -s <session> <block>. The next message you send starts a fresh postman, and nothing queued is lost. If you rely on alarms, send any message straight after, so they keep firing. - Restart any running agents, or ask them to re-read SKILL.md.
Known limits
v0.8.0
rex-teams v0.8.0
Messages now go through a postman. send.lua hands your message to one postman per Rex host and returns at once. The postman types it into the other agent's terminal straight away. Nobody waits on a slow pane, and messages to one agent arrive in the order they were sent.
This release is breaking. Read Upgrading before you install it.
What changes for you
- Sending is faster.
send.luareturns in under 100 ms and printsqueued for <name>: <id>; you'll hear back only if it can't be delivered. The message is typed in at once, not on the postman's next pass. Each message's header now shows its id. - It works in sandboxes.
send.lua,alarm.luaandspawn.luawrite no files. They ask the postman over Rex, and the postman, which Rex starts outside any sandbox, does the writing. Codex inworkspace-writeand other sandboxed agents can now send, set alarms, start subagents and report back. - One reply command. Every header names the sender's host by its Rex host ID, so the reply command in it runs as printed, on this host or another.
host=takes a label fromrex hostsor a host ID, and your own host's ID means this host. - One name rule.
block=takes a block ID, its last 6 or more characters, or a name asteam.luashows it: a pane's label, or the label of a tab with one pane. It's the same in every script and on every host. A name is looked up in your own session first, liketeam.lua, and then across the host. A name that still matches several agents fails and lists them. - Subagents report in the message.
spawn.luano longer makes a task folder. The subagent reads your task file and the skill'sreport.md, so keep the task file until it reports. Its report arrives as a message: its status, a summary, and the command that closes its tab. A long report comes as an attached file.result.mdandclose.mdare gone. - The nesting limit travels with the subagent, as
REX_TEAMS_DEPTHon its command line, so a subagent in a sandbox can still start its own. - Attached files always land in the receiver's inbox,
~/.local/state/rex-teams/inbox/, on this host too. The message lists where they are. - You hear about problems. If the other pane is gone or its program has exited, files can't be copied, or the paste or Enter fails or may not have finished, the postman sends you one message that says why and quotes your text. A failed message won't be sent again; a failed alarm tick is skipped, and the alarm keeps its schedule.
- Alarms are queued messages. They no longer open an
alarm: …pane.alarm.luaprints the alarm's id, andalarm.lua cancel=<id>cancels it.alarm.lua list=truelists your alarms. An alarm never goes off early, and is up to 3 s late, because Rex's Lua clock counts whole seconds (#69). Alarms survive a Rex restart and a reboot, and still go out late. Missed repeats collapse into one, and the schedule doesn't drift.every=must now be at least 10 seconds. - Every script prints the same way:
<what happened>: <id or name>, often with; <next step>. - One trust rule for restarts. It covers the whole scripts folder and replaces the old alarm rule. Without it, waiting messages and alarms are kept, but go out only once someone sends a new message.
- New requirements. Rex 0.1.0-preview.25 or later, and
sha256sumon macOS and Linux (macOS 15+ has it). The postman needs it, so every send does. - When another host is down, its messages wait. Each held receiver on it adds about 10 s to every pass, so every delivery from this host waits that long. A message that can't be delivered for 10 minutes is dropped, and you get the same one notice, quoting its text. A recurring alarm drops only that tick.
- The
rex-teamssession is the postman's alone. When a postman starts, it closes every other block in that session that isn't running a postman, such as old postmen and shells a restart brought back. Then, hourly, it removes what rex-teams left behind for closed panes. - State lives in one folder, not
/tmp. Queued messages and received files are in~/.local/state/rex-teams(%LOCALAPPDATA%\rex-teamson Windows), even if you set$XDG_STATE_HOME: the postman Rex starts never sees your shell's variables. Once a pane closes, the postman removes its received files if they haven't changed for 10 minutes. It doesn't sweep on Windows yet. team.luashows each agent's status (working, idle or blocked) when its CLI reports one.- Alarms are for this host only.
alarm.luano longer takessession=orhost=. - An empty
REX_BLOCKis refused (#56). Before, Rex picked some other terminal. - Unknown arguments are refused.
send.lua,alarm.lua,team.luaandspawn.luastop with an error that names an argument they don't take, such as a misspeltmesage=or an oldsession=, and show the ones they do. Before, they ignored it. Check any scripts or notes that pass extra arguments. - Known limits. Messages are still typed into whatever the receiver shows, including a half-written prompt (#41). Now and then an Enter is lost (#40).
Upgrading from v0.7.0
Ask your agent to do these steps on every host that has rex-teams:
- Let running subagents finish. Subagents started with v0.7.0 report through
/tmp/rex-teams/tasks/. Wait for their reports and close them before you upgrade. - Note your old alarms. Run
rex block ls -Aand find the panes labelledalarm: …; note each one's SESSION and ID columns. v0.7.0 cut the label to 40 characters of the message, so read each alarm's full message and interval from its command line:ps -ww -axo pid=,args= | grep '[a]larm.lua --args'. - Close them before Rex next restarts. Run
rex block close -s <SESSION> <ID>for each one, with the columns from step 2. If you leave them, a restart can bring them back as duplicate alarms. - Update the skill. Run
npx skills add -g campfireshuffle/rex-teams. The-greplaces the global install; without it you get a second copy in the current folder. Check that<skill>/scripts/postman.luaexists. - Swap the trust rule. In Rex's
init.lua, delete theresume.trust.rex-teams-alarmline. Add the line from the README's Install section, with your skill folder's path. Then runrex config reload. Show the user the change first, because it's their config. - Set the alarms again with
alarm.lua in=…orevery=…. Note the id each one prints. - Check it works. Send yourself a message:
rex do <skill>/scripts/send.lua block="$REX_BLOCK" message='test'. It should arrive within a second or two. The postman runs as a detached block in arex-teamssession, with no tab; leave that session alone. - Restart running agents or have them re-read SKILL.md. The old instructions no longer apply: cancelling alarms with
rex block close,session=on alarms, and readingresult.mdandclose.md. - Remove rex-teams' old folders from
/tmp/rex-teams(%TEMP%\rex-teamson Windows):tasks,inbox,outbox,depthandstage. rex-teams no longer uses them. Don't delete the whole folder: agents often keep their own briefs and notes there, and it may be a symlink to somewhere else.
v0.7.0
What's Changed
- docs: build for the steady state, and state the minimum Rex once by @campfireshuffle in #64
- feat: bring alarms back after a Rex server restart by @campfireshuffle in #65
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's Changed
- feat: attach files to messages with file= by @campfireshuffle in #63
Full Changelog: v0.5.0...v0.6.0
v0.5.0
What's Changed
- feat: message and list agents on other Rex hosts by @campfireshuffle in #39
Full Changelog: v0.4.2...v0.5.0
v0.4.2
What's Changed
- fix: find the caller's session from REX_BLOCK by @campfireshuffle in #49
Full Changelog: v0.4.1...v0.4.2
v0.4.1
What's Changed
- fix: single-quote generated send commands by @campfireshuffle in #35
- fix: publish complete assignments before spawning agents by @campfireshuffle in #36
Full Changelog: v0.4.0...v0.4.1
v0.4.0
What's Changed
- feat: show worktree isolation without crowding tabs by @campfireshuffle in #23
Full Changelog: v0.3.2...v0.4.0
v0.3.2
What's Changed
- docs: clarify Rex subagent workflow in README intro by @campfireshuffle in #21
- fix: indent nested subagent labels with a single arrow by @campfireshuffle in #22
Full Changelog: v0.3.1...v0.3.2
v0.3.1
What's Changed
- feat: open subagent tabs next to their parent, nested like a tree by @campfireshuffle in #20
Full Changelog: v0.3.0...v0.3.1