Repository navigation
chore(startup): auto-install tmux via Homebrew when missing - #453
Merged
Merged
Conversation
Sutando.app's watcher-auto-restart (PR #444) depends on a tmux-wrapped CLI pane to send `watcher` keystrokes when the task-watcher dies. If tmux is missing on a first-run machine, startup.sh falls back to a bare `exec claude` — functional, but silently drops the auto-restart feature. This adds a 5-line guard: if tmux is missing and Homebrew is available, install tmux before wrapping the CLI. If brew is also missing, keep the existing fallback behavior (warn + bare exec). Tested: `bash -n src/startup.sh` clean. No behavioral change when tmux is already present. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sonichi
commented
Apr 19, 2026
sonichi
left a comment
Owner
Author
There was a problem hiding this comment.
LGTM. Small, isolated, backward compatible.
Logic verified:
- Guard checks both
command -v tmuxmissing ANDcommand -v brewpresent → only auto-installs when Homebrew is available, respects existing assumptions. brew install tmux 2>&1 | tail -3truncates noise.- Subsequent
if command -v tmuxfallthrough still catches "install failed or brew absent" → bareexec claudewith warning. - Preserves the intent of PR #444's auto-restart feature for first-run users without tmux.
Minor nit (not blocking): brew install tmux can take 30+ seconds on first run, and | tail -3 hides progress during that window. Consider printing a one-liner before the pipe if you want to signal "this may take a moment":
echo "tmux not found — installing via Homebrew (~30s)..."
(already close to what you have — just the "~30s" hint helps users not think it's hung). Totally optional.
No behavior change when tmux is already present. bash -n clean per Mini's PR body.
MacBook's review nit on PR #453: the brew install takes ~30s on first run and `| tail -3` hides progress during that window. A single word in the echo signals to the user that the pause is expected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sonichi
added a commit
that referenced
this pull request
Apr 19, 2026
MacBook's cold-review on #453 suggested signaling that `brew install tmux` takes ~30s so first-run users don't think the script hung while tail -3 hides the brew progress output. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
liususan091219
pushed a commit
to liususan091219/sutando-fork
that referenced
this pull request
May 28, 2026
) * chore(startup): auto-install tmux via Homebrew when missing Sutando.app's watcher-auto-restart (PR sonichi#444) depends on a tmux-wrapped CLI pane to send `watcher` keystrokes when the task-watcher dies. If tmux is missing on a first-run machine, startup.sh falls back to a bare `exec claude` — functional, but silently drops the auto-restart feature. This adds a 5-line guard: if tmux is missing and Homebrew is available, install tmux before wrapping the CLI. If brew is also missing, keep the existing fallback behavior (warn + bare exec). Tested: `bash -n src/startup.sh` clean. No behavioral change when tmux is already present. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(startup): add ~30s hint to tmux install echo MacBook's review nit on PR sonichi#453: the brew install takes ~30s on first run and `| tail -3` hides progress during that window. A single word in the echo signals to the user that the pause is expected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Chi <wangchi@Chis-Mac-mini.local> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Per your "y" at 21:00Z in #dev: Sutando.app's watcher-auto-restart (PR #444) depends on a tmux-wrapped CLI pane to send
watcherkeystrokes when the task-watcher dies. If tmux is missing on a first-run machine,startup.shfalls back to a bareexec claude— functional, but silently drops the auto-restart feature.Change
5-line guard in
src/startup.sh:294: if tmux is missing AND Homebrew is available, install tmux before wrapping the CLI. Preserves the existing bare-exec fallback when both are absent.Test plan
bash -n src/startup.shcleanbash src/startup.shshould auto-install then proceed to tmux wrap (no user prompt, no failed step)Scope
Doesn't touch the "neither tmux nor brew" path — that branch already has a helpful warning pointing at
brew install tmux, just skipped now by the Homebrew short-circuit.🤖 Generated with Claude Code