Drop cleanup.ts, session-created-handler.ts, and session-deleted-handler.ts
which were never wired up; the lifecycle logic they contained lives inline
in TmuxSessionManager. Barrels trimmed to match.
Introduce a dedicated module that builds the two-window tmux layout team-mode relies on:
- "focus" window uses main-vertical for the lead-centric view
- "grid" window uses tiled so every member pane is visible at once
createTeamLayout spawns omo-team-<teamRunId>, registers pane titles with
color-coded labels, and returns the focus/grid window IDs plus a
pane-by-member map. removeTeamLayout tears the session down idempotently.
canVisualize short-circuits when TMUX is unset so callers degrade
gracefully outside a tmux context.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Awaiting the tmux callback blocked the prompt for up to 10s (waitForSessionReady downstream). During that window the spawned pane ran 'opencode attach' against an empty session and rendered a blank TUI. Users saw 'pane created but attach not working'.
Start promptWithModelSuggestionRetry immediately after session.create, then invoke the tmux callback as fire-and-forget. The session becomes active before the attach client connects.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
waitForSessionReady polled session.status for up to 10s before the pane was registered, but session.status only becomes visible after promptAsync starts. Blocking pane tracking on that signal caused the attach client to see an empty session and render a blank TUI.
Track the pane immediately after spawn, and run the readiness probe in the background purely for observability.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
The zauc-mocks-hook variant previously asserted that session.created synchronously
ran the startup checks. After auto-update-checker was refactored to defer work to
the first session.idle via scheduleDeferredIdleCheck (5s timer), those assertions
never fired.
Mirror the mock+capture pattern from hook.test.ts so the test drives the deferred
callback synchronously, preserving the original invariants (hasChecked guard,
localDev toast, sisyphus wording) without waiting on real timers.