-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Chore Type
Configuration change
Description
The justfile.worktree recipes rely on tmux to run autonomous cursor-agent sessions in detached tmux sessions (tmux new-session -d -s "wt-<issue>"). However, tmux is not included in the Containerfile's apt-get install list (line 53-62), so just worktree-start fails at the prerequisite check.
This is especially important for the remote devcontainer use case: worktree agents must survive Cursor session disconnects, and tmux is the persistence mechanism that makes this possible. Without tmux, the autonomous TDD workflow (RED-GREEN-REFACTOR with per-phase commits as defined in .cursor/rules/tdd.mdc) cannot run to completion — a disconnected session kills the agent mid-cycle, leaving partial test/implementation commits and breaking TDD compliance in the git history.
Acceptance Criteria
-
tmuxis installed viaapt-getin the Containerfile alongside existing system dependencies - Container image builds successfully with tmux included
-
just worktree-startno longer fails the tmux prerequisite check inside the container - Autonomous worktree agents can complete full TDD cycles (test commit → implementation commit → refactor commit) after Cursor session disconnect
- Unit test:
test_tmux_installedadded toTestSystemToolsintests/test_image.py— verifiestmuxapt package is installed (follows existing pattern:host.package("tmux").is_installed) - Unit test:
test_tmux_versionadded toTestSystemTools— verifiestmux --versionreturns successfully and matches expected major version -
tmuxversion added toEXPECTED_VERSIONSdict intests/test_image.py - Integration/smoke test:
test_tmux_detached_session_survivesadded totests/test_image.py— creates a detached tmux session, verifies it appears intmux list-sessions, and confirms the session's background process is running (validates the core persistence mechanism worktree agents rely on)
Implementation Notes
- Add
tmux \to the existingapt-get installblock in the Containerfile (line 53-62). No other changes should be needed — the justfile already has the tmux check and usage in place. - Unit tests follow the exact pattern of
test_nano_installed/test_git_versionetc. inTestSystemTools. - The smoke test should create a detached session (
tmux new-session -d -s test-session "sleep 60"), verify it withtmux list-sessions, then clean up (tmux kill-session -s test-session). This validates the same mechanismjustfile.worktreeuses without needing the full worktree infrastructure.
Related Issues
None
Priority
Medium
Changelog Category
Added
Additional Context
The justfile.worktree already validates tmux is present and errors with a helpful message if missing. This issue just closes the gap so the container is ready out of the box for autonomous TDD workflows.