Retire per-worktree tmux machinery + update docs #269

Closed
opened 2026-07-09 10:21:05 +02:00 by dries · 0 comments
Owner

Parent

#265 — One OpenCode per project: worktree sessions run in-app.

What to build

Pure contraction once no caller uses the old per-worktree flow: delete
the retired machinery and update docs. The one remaining opencode launch
is the single project instance via EnsureProjectOpencode.

  • Delete tmux.LaunchWorktreeWindow, LaunchWorktreeWindowWith, the
    WorktreeSession ("ocman-worktree") constant, and the per-worktree
    window naming / AD-3 / AD-4 idempotent-relaunch logic.
  • Remove the now-dead tmux-target / opencode-launched fields from
    WorktreeSessionResult and any wire types that referenced them.
  • Remove the retired SessionLauncher deps that are no longer used for
    the worktree path (launchTmux / waitForPort for worktrees) if fully
    dead after #268.
  • Leave any opencode/tmux windows created by the old flow running — no
    teardown logic.
  • Docs: update AGENTS.md (worktree paragraph — no longer "one opencode
    per worktree"), docs/architecture.md (session/worktree data flow),
    and worktree user docs. Document the pre-existing-instance limitation
    (an already-running project instance was not seeded with the
    external_directory rule; runtime autoapprove covers the gap).

Acceptance criteria

  • LaunchWorktreeWindow*, WorktreeSession const, and AD-3/AD-4
    relaunch logic removed; no references remain.
  • Dead result / wire fields removed.
  • AGENTS.md + docs/architecture.md + worktree docs updated,
    including the pre-existing-instance limitation.
  • make test && make lint && make build green; coverage delta ≥ 0.

Blocked by

  • #268 — Wire all three callers in-app.
## Parent #265 — One OpenCode per project: worktree sessions run in-app. ## What to build Pure contraction once no caller uses the old per-worktree flow: delete the retired machinery and update docs. The one remaining opencode launch is the single project instance via `EnsureProjectOpencode`. - Delete `tmux.LaunchWorktreeWindow`, `LaunchWorktreeWindowWith`, the `WorktreeSession` ("ocman-worktree") constant, and the per-worktree window naming / AD-3 / AD-4 idempotent-relaunch logic. - Remove the now-dead tmux-target / opencode-launched fields from `WorktreeSessionResult` and any wire types that referenced them. - Remove the retired `SessionLauncher` deps that are no longer used for the worktree path (`launchTmux` / `waitForPort` for worktrees) if fully dead after #268. - Leave any opencode/tmux windows created by the *old* flow running — no teardown logic. - Docs: update `AGENTS.md` (worktree paragraph — no longer "one opencode per worktree"), `docs/architecture.md` (session/worktree data flow), and worktree user docs. Document the pre-existing-instance limitation (an already-running project instance was not seeded with the `external_directory` rule; runtime autoapprove covers the gap). ## Acceptance criteria - [ ] `LaunchWorktreeWindow*`, `WorktreeSession` const, and AD-3/AD-4 relaunch logic removed; no references remain. - [ ] Dead result / wire fields removed. - [ ] `AGENTS.md` + `docs/architecture.md` + worktree docs updated, including the pre-existing-instance limitation. - [ ] `make test && make lint && make build` green; coverage delta ≥ 0. ## Blocked by - #268 — Wire all three callers in-app.
dries closed this issue 2026-07-09 14:29:36 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#269
No description provided.