lazymartha#6 package 3: Claude Code members in a real CLI pane (pty + emulator, no kitty or tmux) #11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Raf, 2026-12-02, in martha-ai/lazymartha#6: "the UX is not great at all. How difficult would it be to port martha-engine into lazymartha, get rid of the dependency on kitty/tmux and make lazymartha into a one-stop TUI?"
DECIDED 2026-12-02 "Yes, build it (Recommended)"; DECIDED 2026-12-02 "Real CLI in a pane (Recommended)"; DECIDED 2026-12-02 "Whole room (Recommended)".
Purpose (feature): package 3 of the design on #6 (comment 8053), option (b) of its §3: a Claude Code member of the crew runs as the real
claudeCLI, started bymartha start <member>exactly as today, in a pty that lazymartha emulates and draws in that member's pane; keys and resize reach it, and "needs you" is read from the member's dashboard row.Refs #6
Package 1 (martha serves ACP upward) is not needed here and nothing it changes is touched: a Claude Code member never speaks ACP. The crew strip, the room pane and the martha.json editor tab are package 4;
martha upexecing this screen is package 5; removing tmux and kitty from martha is package 6.Done when
lazymartha crew --root <root>starts every Claude Code member its declaration names and does not park —martha start <member>, unchanged, as a child in a pty — beside the engine members it already starts over ACP. No kitty, no tmux.github.com/charmbracelet/x/vt): what the CLI drew, styled, at the pane's size.f12hands the keyboard back to the crew and takes it again, soctrl+cinterrupts the CLI and quits the screen only from the crew.<CREW>/row/<member>.jsonunder the crew directorymartha wherenames: the member list shows the row's state, the newest open dialog's words (or the row's ownneeds) are shown with the pane, and a row quiet past the crew's offline time (the declaration'sthresholds.offline_after_seconds, 30 s when it names none) readsoffline.go test ./...andgo vet ./...pass, and no test reaches outside the box: every pty child in a test is a stand-in program of the test's own — no real Claude Code, no model, no network.Landed: main is
caa38f1(fast-forward; PR 12 closed by Terra). CI: run 6853 success atcaa38f1(the PR run), run 6858 success atcaa38f1(the push on main).r=2 closed Mercurius's r=1 FAIL: BodySize() shrinks a row per ask drawn while the CLI's pty kept its height, so screenLines cut the CLI's bottom rows. The screen now reads its body size before and after each event and makes every CLI the height its pane is drawn at.
Telling the CLIs is a tea.Cmd, never a call: prog.Send from inside Update deadlocks bubbletea v1.3.11 (measured), and r=1's own ctrl+a, Enter-for-a-turn and terminal-resize paths all froze the real screen the same way — folded in. The same run drove both before and after in a real pty.
Tests: TestTwoAsksLeaveTheClisTerminalItsPanesHeight (fails on
9cff0e9) and TestATurnDoesNotStopTheScreensLoop (fails on9cff0e9). Gate: go vet, gofmt, go test ./... twice and once -race, all green.Filed while landing: #13, the one remaining synchronous write in Update (Keys → pty write), so a CLI that stops reading its keys cannot freeze the screen later.