Draft
Conversation
Implement a kolu-tmux CLI shim that translates tmux commands into Kolu HTTP RPC calls, enabling Claude Code's teammate/swarm feature to work inside Kolu terminals with zero user configuration. The shim handles the ~10 tmux subcommands Claude Code actually uses: split-window, send-keys, kill-pane, capture-pane, list-panes, display-message, has-session, list-windows, list-sessions, and -V. No-ops for layout/styling commands (select-layout, set-option). Server changes: - Inject $TMUX, $TMUX_PANE, and the shim binary into PTY shell env - Add /api/terminals non-streaming endpoint for shim to query - Create temp tmux wrapper at startup, clean up on shutdown - Allocate unique pane indices per terminal (monotonic counter) Closes #185
- Fix mutating sort in buildPaneMap (use [...all].sort()) - Remove non-null assertions on .find() (use type-narrowing filter) - Remove unused variables (printFlag, created) - Remove stale KOLU_TMUX_IDS doc comment - Move imports to top of file - Extract VALUED_FLAGS to module-level constant - Hoist buildPaneMap outside loop in cmdListPanes - Remove async from resolveTarget (no awaits) - Use DEFAULT_PORT from config instead of hardcoded "7681" - Remove inaccurate fallback to pane 0 when TMUX_PANE unset
- Use absolute tsx path in wrapper script (PTY shells may not have tsx on PATH after NixOS shell init rebuilds PATH) - Store tmuxPaneIndex on TerminalProcess and expose via /api/terminals so the shim maps %N pane IDs correctly across test scenarios - Remove -p and -l from VALUED_FLAGS (both are boolean in supported cmds) - Simplify e2e tests: split round-trip into separate split + capture scenarios, use direct API for capture verification
14 tasks
srid
added a commit
that referenced
this pull request
Apr 2, 2026
The `/workflow do` DAG runs end-to-end but never checks whether documentation still matches the code after structural changes. PR #286 (tmux shim) shipped new server modules without updating the README architecture section — exactly the kind of drift CLAUDE.md warns about. This adds a `docs` check-then-fix loop between `update-pr` and `done`, mirroring the existing police/police-fix and ci/ci-fix patterns. The node reads README.md's Architecture section, compares against `git diff master...HEAD`, and updates any stale sections before completing. Also strengthens `workflow.md` with a "never stop between nodes" rule to prevent the orchestrator from pausing after skill nodes return. - [x] sync - [x] understand - [x] hickey - [x] branch - [x] implement - [x] e2e - [x] fmt - [x] commit - [x] police - [x] test - [ ] ci - [x] update-pr - [x] docs - [ ] done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
kolu-tmuxCLI shim that translates tmux commands into Kolu RPC calls, letting Claude Code's teammate/swarm feature work inside Kolu terminals with zero user configuration.Claude Code detects tmux via
$TMUXand thetmuxbinary on PATH, then uses ~10 subcommands (split-window,send-keys,kill-pane,capture-pane,list-panes,display-message,has-session,-V) to manage agent panes. The shim intercepts these and maps them to Kolu's existing terminal RPC —terminal.create,terminal.sendInput,terminal.kill,terminal.screenText, etc. No-ops for layout/styling commands that have no Kolu equivalent (select-layout,set-option).The server injects
$TMUXand$TMUX_PANEinto PTY shells and creates a temp wrapper script on$PATHastmuxat startup, so Claude Code auto-detects multiplexer support. Each terminal gets a unique monotonic pane index (%0,%1, ...) for multi-instance isolation — Claude Code reads$TMUX_PANEat startup to scope its teammate operations.Closes #185